ENet Class Library for C#

Peer.Send(Byte, Byte, Int32, Int32, PacketFlags) Method

Enqueues a packet for sending using the given data, offsets, length, and flags.

[Visual Basic]
Public Overloads Sub Send( _
   ByVal channelID As Byte, _
   ByVal data As Byte, _
   ByVal offset As Integer, _
   ByVal length As Integer, _
   ByVal flags As PacketFlags _
)
[C#]
public void Send(
   byte channelID,
   byte[] data,
   int offset,
   int length,
   PacketFlags flags
);

Parameters

channelID
The ID of the channel to send on.
data
The array containing the data to send.
offset
The index of the first byte of data.
length
The length of the data.
flags
The packet flags.

Exceptions

Exception Type Condition
ArgumentNullException data is null.
ArgumentOutOfRangeException offset and/or length are out of range.
InvalidOperationException The peer is not initialized.
ENetException An error occured.

See Also

Peer Class | ENet Namespace | Peer.Send Overload List