Method PopEvent
PopEvent(NetworkDriver, out DataStreamReader)
Pop the next available event on the connection.
Declaration
public NetworkEvent.Type PopEvent(NetworkDriver driver, out DataStreamReader stream)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkDriver | driver | Driver from which to get the event. |
| DataStreamReader | stream | Reader into the data associated to the event. Only populated if the returned event is Data or Disconnect, where respectively the data will be either the received payload, or the disconnection reason (as a single byte). |
Returns
| Type | Description |
|---|---|
| NetworkEvent.Type | Type of the popped event. Empty if nothing to pop. |
PopEvent(NetworkDriver, out DataStreamReader, out NetworkPipeline)
Pop the next available event on the connection.
Declaration
public NetworkEvent.Type PopEvent(NetworkDriver driver, out DataStreamReader stream, out NetworkPipeline pipeline)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkDriver | driver | Driver from which to get the event. |
| DataStreamReader | stream | Reader into the data associated to the event. Only populated if the returned event is Data or Disconnect, where respectively the data will be either the received payload, or the disconnection reason (as a single byte). |
| NetworkPipeline | pipeline | Pipeline on which the data was received. |
Returns
| Type | Description |
|---|---|
| NetworkEvent.Type | Type of the popped event. Empty if nothing to pop. |