Method PopEvent
PopEvent(out NetworkConnection, out DataStreamReader)
Pops the next event from the event queue, Empty will be returned if there are no more events to pop.
Declaration
public NetworkEvent.Type PopEvent(out NetworkConnection connection, out DataStreamReader reader)
Parameters
Type | Name | Description |
---|---|---|
Network |
connection | Connection on which the event occured. |
Data |
reader | Data |
Returns
Type | Description |
---|---|
Network |
The type of the event popped. |
Remarks
The reader
obtained from this method will contain different things for different
event types. For Data, it contains the actual received
payload. For Disconnect, it contains a single byte
identifying the reason for the disconnection (see Disconnect
PopEvent(out NetworkConnection, out DataStreamReader, out NetworkPipeline)
Pops the next event from the event queue, Empty will be returned if there are no more events to pop.
Declaration
public NetworkEvent.Type PopEvent(out NetworkConnection connection, out DataStreamReader reader, out NetworkPipeline pipe)
Parameters
Type | Name | Description |
---|---|---|
Network |
connection | Connection on which the event occured. |
Data |
reader | Data |
Network |
pipe | Pipeline on which the data event was received. |
Returns
Type | Description |
---|---|
Network |
The type of the event popped. |
Remarks
The reader
obtained from this method will contain different things for different
event types. For Data, it contains the actual received
payload. For Disconnect, it contains a single byte
identifying the reason for the disconnection (see Disconnect