Skip to main content

Unity.Networking.Transport.NetworkPacketReceiver

The NetworkPacketReceiver is an interface for handling received packets, needed by the INetworkInterface

Inherited Members#

ValueType.Equals(Object)

ValueType.GetHashCode()

ValueType.ToString()

Object.Equals(Object, Object)

Object.GetType()

Object.ReferenceEquals(Object, Object)

Namespace: System.Dynamic.ExpandoObject#
Assembly: MLAPI.dll#
Syntax#
public struct NetworkPacketReceiver

Properties#

ReceiveCount#

Declaration#

public int ReceiveCount { get; set; }

Property Value#

TypeDescription
System.Int32

ReceiveErrorCode#

Declaration#

public int ReceiveErrorCode { set; }

Property Value#

TypeDescription
System.Int32

Methods#

AppendPacket(NetworkInterfaceEndPoint, UdpCHeader, Int32)#

AppendPacket is where we parse the data from the network into easy to handle events.

Declaration#

public int AppendPacket(NetworkInterfaceEndPoint address, UdpCHeader header, int dataLen)

Parameters#

TypeNameDescription
NetworkInterfaceEndPointaddressThe address of the endpoint we received data from.
UdpCHeaderheaderThe header data indicating what type of packet it is. UdpCHeader for more information.
System.Int32dataLenThe size of the payload, if any.

Returns#

TypeDescription
System.Int32

DynamicDataStreamSize()#

Check if the DataStreamWriter uses dynamic allocations to automatically resize the buffers or not.

Declaration#

public bool DynamicDataStreamSize()

Returns#

TypeDescription
System.BooleanTrue if its dynamically resizing the DataStreamWriter

GetDataStream()#

Get the datastream associated with this Receiver.

Declaration#

public NativeList<byte> GetDataStream()

Returns#

TypeDescription
NativeList<System.Byte>Returns a NativeList of bytes

GetDataStreamSize()#

Declaration#

public int GetDataStreamSize()

Returns#

TypeDescription
System.Int32