Method BeginSend
BeginSend(NetworkConnection, out DataStreamWriter, int)
Begin sending data on the given connection (default pipeline).
Declaration
public int BeginSend(NetworkConnection connection, out DataStreamWriter writer, int requiredPayloadSize = 0)
Parameters
Type | Name | Description |
---|---|---|
NetworkConnection | connection | Connection to send the data to. |
DataStreamWriter | writer | DataStreamWriter the data can be written to. |
int | requiredPayloadSize | Size that the returned DataStreamWriter must support. The method will return an error if that payload size is not supported by the pipeline. Defaults to 0, which means the DataStreamWriter will be as large as it can be. |
Returns
Type | Description |
---|---|
int | 0 on success, a negative value on error. |
BeginSend(NetworkPipeline, NetworkConnection, out DataStreamWriter, int)
Begin sending data on the given connection and pipeline.
Declaration
public int BeginSend(NetworkPipeline pipe, NetworkConnection connection, out DataStreamWriter writer, int requiredPayloadSize = 0)
Parameters
Type | Name | Description |
---|---|---|
NetworkPipeline | pipe | Pipeline to send the data on. |
NetworkConnection | connection | Connection to send the data to. |
DataStreamWriter | writer | DataStreamWriter the data can be written to. |
int | requiredPayloadSize | Size that the returned DataStreamWriter must support. The method will return an error if that payload size is not supported by the pipeline. Defaults to 0, which means the DataStreamWriter will be as large as it can be. |
Returns
Type | Description |
---|---|
int | 0 on success, a negative error code on error. |