ENet Class Library for C#

Packet.Initialize(IntPtr, Int32, PacketFlags) Method

Initializes a new packet from data, of the given length, and with the given flags.

[Visual Basic]
Public Overloads Sub Initialize( _
   ByVal data As IntPtr, _
   ByVal length As Integer, _
   ByVal flags As PacketFlags _
)
[C#]
public void Initialize(
   IntPtr data,
   int length,
   PacketFlags flags
);

Parameters

data
A pointer to the first byte of data.
length
The length of the data.
flags
The flags the packet will use.

Exceptions

Exception Type Condition
InvalidOperationException The packet is already initialized.
ENetException Packet creation failed.

See Also

Packet Class | ENet Namespace | Packet.Initialize Overload List