ENet Class Library for C#

Peer.Receive Method

Dequeue a received packet.

[Visual Basic]
Public Sub Receive( _
   ByRef channelID As Byte, _
   ByRef packet As Packet _
)
[C#]
public bool Receive(
   out byte channelID,
   out Packet packet
);

Parameters

channelID
The ID of the channel the packet was sent on.
packet
The received packet.

Return Value

True if a packet was dequeued, or false if there are no more packets.

Exceptions

Exception Type Condition
InvalidOperationException The peer is not initialized.

See Also

Peer Class | ENet Namespace