ENet Class Library for C#

Host.Broadcast Method

Broadcast a packet to all peers.

[Visual Basic]
Public Sub Broadcast( _
   ByVal channelID As Byte, _
   ByRef packet As Packet _
)
[C#]
public void Broadcast(
   byte channelID,
   ref Packet packet
);

Parameters

channelID
The ID of the channel
packet
The packet to send.

Remarks

ENet takes ownership of the packet. Do not call methods on it afterwards.

Exceptions

Exception Type Condition
InvalidOperationException The host is not initialized.

See Also

Host Class | ENet Namespace