Method AppendPacket
AppendPacket(IntPtr, ref NetworkInterfaceEndPoint, int, AppendPacketMode)
When data is received this function should be called to pass it inside NetworkDriver
Declaration
public bool AppendPacket(IntPtr data, ref NetworkInterfaceEndPoint address, int dataLen, NetworkPacketReceiver.AppendPacketMode mode = AppendPacketMode.None)
Parameters
Type | Name | Description |
---|---|---|
IntPtr | data | Pointer to the data. If it is pointer to data that was received with AllocateMemory(ref int) make sure mode is NoCopyNeeded> |
NetworkInterfaceEndPoint | address | Address where data was received from |
int | dataLen | Length of data in bytes |
NetworkPacketReceiver.AppendPacketMode | mode | Extra flags, like NoCopyNeeded that means - no copy is needed, data is already in NetworkDriver's data stream |
Returns
Type | Description |
---|---|
bool | True if no errors |