qResult SendReliable( StationID id, SubStreamID subStreamID, const qByte * pBuffer, qUnsignedInt32 size );
Name | Description | |
---|---|---|
in | id | Specifies the StationID for the destination station. |
in | subStreamID | Specifies the SubStreamID used for sending. Shared with the system, SubStreamIDDefine::SYSTEM is equivalent to performing reliable communications with Send . |
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) |
The send buffer for reliable communication is full. (Even when this error is returned in this function, a fatal error that can be retrieved with NetZ::GetFatalError is not set.) |
QERROR(Transport, InvalidSubStreamID) |
When the specified SubStreamID is an invalid ID. It is also issued when the SubStreamID cannot be received by the partner station. |
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 reliable data with a specified SubStreamID
to a specific station.
To get the StationID
, use the Station::GetStationID
function. A ReliableSendBufferFull
error is returned when the send buffer is full. The ReliableSendBufferFull
error indicates that the send buffer is temporarily full, so 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.CONFIDENTIAL