ENet Class Library for C#

Packet.Initialize(IntPtr, Int32) Method

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

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

Parameters

data
A pointer to the first byte of data.
length
The length of the data.

Exceptions

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

See Also

Packet Class | ENet Namespace | Packet.Initialize Overload List