ENet Class Library for C#

Packet.Initialize(Byte, PacketFlags) Method

Initializes a new packet, with the given flags.

[Visual Basic]
Public Overloads Sub Initialize( _
   ByVal data As Byte, _
   ByVal flags As PacketFlags _
)
[C#]
public void Initialize(
   byte[] data,
   PacketFlags flags
);

Parameters

data
The data the packet will contain.
flags
The flags the packet will use.

Exceptions

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

See Also

Packet Class | ENet Namespace | Packet.Initialize Overload List