Method BeginSend
BeginSend(NetworkConnection, out DataStreamWriter, int)
Acquires a DataStreamWriter for starting a asynchronous send.
Declaration
public int BeginSend(NetworkConnection id, out DataStreamWriter writer, int requiredPayloadSize = 0)
Parameters
Type | Name | Description |
---|---|---|
NetworkConnection | id | The NetworkConnection id to write through |
DataStreamWriter | writer | A DataStreamWriter to write to |
int | requiredPayloadSize | If you require the payload to be of certain size |
Returns
Type | Description |
---|---|
int | Returns Success on a successful acquire. Otherwise returns an StatusCode indicating the error. |
Remarks
Will throw a InvalidOperationException if the connection is in a Connecting state.
BeginSend(NetworkPipeline, NetworkConnection, out DataStreamWriter, int)
Acquires a DataStreamWriter for starting a asynchronous send.
Declaration
public int BeginSend(NetworkPipeline pipe, NetworkConnection id, out DataStreamWriter writer, int requiredPayloadSize = 0)
Parameters
Type | Name | Description |
---|---|---|
NetworkPipeline | pipe | The NetworkPipeline to write through |
NetworkConnection | id | The NetworkConnection id to write through |
DataStreamWriter | writer | A DataStreamWriter to write to |
int | requiredPayloadSize | If you require the payload to be of certain size |
Returns
Type | Description |
---|---|
int | Returns Success on a successful acquire. Otherwise returns an StatusCode indicating the error. |
Remarks
Will throw a InvalidOperationException if the connection is in a Connecting state.