Open topic with navigation
WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
status = %SS_RECV(socket, buf, bytes_received[, SS_MSG_PEEK])
Returns SS_SUCCESS (0) or one of the errors in Error codes returned by %SS_RECV below. (n)
A descriptor of an open socket created by %SS_SOCKET. (i4)
Buffer returned with the incoming data. (a)
Returned with the number of bytes received and placed into buf. (i4)
(optional) Peek into the data that is next in line to be received without removing it from the system’s buffers. (n)
%SS_RECV reads incoming data from a connected stream socket or from a datagram socket with an established peer address. (To receive data from a datagram socket without an established peer address, use %SS_RECVFROM.)
Unlike %SS_RECVBUF, however, you can pass the SS_MSG_PEEK flag to %SS_RECV to peek into the data to be received without actually removing that data from the system’s buffers.
If no incoming data is available at the socket, %SS_RECV blocks until data arrives.
See the Socket Errors table for additional information about these errors.