Packet.onRecieve

Called after the packet is received over the network.

This function can be defined by derived classes to transform the data after it is received; this can be used for uncompression, decryption, etc.

The function receives an array of the received data, and must fill the packet with the transformed bytes. The default implementation fills the packet directly without transforming the data.

class Packet
void
onRecieve
(
const(void)[] data
)

Parameters

data
Type: const(void)[]

Array of the received bytes

Meta