%SS_RECVBUF
Receive bytes from a connected stream socket
WTSupported in traditional Synergy on Windows
|
WNSupported in Synergy .NET on Windows
|
USupported on UNIX
|
VSupported on OpenVMS
|
status = %SS_RECVBUF(socket, buf)
Return value
status
Returns SS_SUCCESS (0) or one of the errors in Error codes returned by %SS_RECVBUF below. (n)
Arguments
socket
A descriptor of an open socket created by %SS_SOCKET. (i4)
buf
Buffer returned with the incoming data. (a)
Discussion
%SS_RECVBUF reads an exact amount of incoming data from a connected stream socket in a loop to ensure the entire packet has been received. %SS_RECVBUF is equivalent to calling %SS_RECV in a loop, but offers better performance.
It is conceivable, although highly unlikely, that an infinite loop may result if the length in the packet is longer than the actual packet or if the packet has been corrupted so that this appears to be the case.
If no incoming data is available at the socket, or if %SS_RECVBUF hasn’t finished reading in all the incoming data, %SS_RECVBUF blocks (even if the remote side disconnects).
%SS_SENDBUF is the complimentary function used in a peer Synergy DBL sockets application.
Error codes returned by %SS_RECVBUF
See the Socket Errors table for additional information about these errors.
SS_EBADF
SS_ECONNABORTED
SS_ECONNRESET
SS_EDISCON
SS_EFAULT
SS_EINTR
SS_EINVAL
SS_ENETDOWN
SS_ENOBUFS
SS_ENOTCONN
SS_ENOTSOCK
SS_EUNKNOWN
SS_NOTINITIALISED