qResult Send( StationID id, StreamType type, const qByte * pBuffer, qUnsignedInt32 size );
Name | Description | |
---|---|---|
in | id | Specifies the StationID for the destination station. |
in | type | Specifies the communication type. |
in | pBuffer | Specifies the data to send. |
in | size | Specifies the size of the send data. Set this parameter to 32,768 or less for reliable communication. For other types of communication, set it to 1,300 or less (1,250 or less for topologies other than P2P). |
Value | Description |
---|---|
QSUCCESS(Core, Success) |
The send request was successful. |
QERROR(Core, InvalidSequence) |
The DirectStream is not enabled. |
QERROR(Transport, Unknown) |
The PRUDPUserProtocol::GetInstance function is NULL . |
QERROR(Core, CallInitiationFailure) |
Initialization of the call context failed. |
QERROR(Core, InvalidArgument) |
Invalid argument value. (pBuffer is NULL or size has been exceeded.)) |
QERROR(Transport, ConnectionFailure) |
Connection was not established with the destination station. |
QERROR(Transport, InvalidStation) |
The station being sent to does not exist. (It is either connecting or never existed.)) |
QERROR(Transport, ReliableSendBufferFull) |
This occurs when the send buffer for reliable communication is full. The application needs to handle this. (The return of this error by this function is not a fatal error, which can be retrieved with NetZ::GetFatalError .) |
QERROR(Transport, PacketBufferFull) |
Data could not be sent due to packet buffer exhaustion. The application needs to handle this. (The return of this error by this function is not a fatal error, which can be retrieved with NetZ::GetFatalError .) |
Sends data to a specific station.
To get the StationID
, use the Station::GetStationID
function. When using reliable communication to send data, the ReliableSendBufferFull
error is returned if the send buffer is full. The ReliableSendBufferFull
error indicates that the send buffer is temporarily full. When this error occurs, dispatch the data and then wait briefly before trying to send the data again.
Returns a PacketBufferFull
error when the packet buffer does not have enough space. This error indicates that the packet buffer was temporarily insufficient. Dispatch the data and wait briefly before trying to send the data again. If PacketBufferFull
occurs at a high frequency, take measures to increase the packet buffer. For more information about packet buffer settings, see PacketBufferManager
.
QRESULT_SUCCESS
and QRESULT_ERROR
return values to QSUCCESS
and QERROR
.
QRESULT_ERROR(Transport, PacketBufferFull)
to the return values.ConnectionID
to StationID
.QRESULT_ERROR(Transport, InvalidStation)
is returned when the station being sent to does not exist.NetZ::GetFatalError
is not set even when this function returns QRESULT_ERROR(Transport, ReliableSendBufferFull)
.CONFIDENTIAL