%SS_LISTEN

Listen for connections

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
status = %SS_LISTEN(socket[, backlog])

Return value

status

Returns SS_SUCCESS (0) or one of the errors in Error codes returned by %SS_LISTEN below. (n)

Arguments

socket

A descriptor of an open socket created by %SS_SOCKET. (i4)

backlog

(optional) Specifies the maximum number of pending connections (1 to 5) that may be queued on the stream socket at any given time. If not passed, the default is 5. (n)

Discussion

%SS_LISTEN creates a queue for pending connection requests on socket. Connections can then be accepted with %SS_ACCEPT or %SS2_ACCEPT. If a connection request arrives with the queue full, the client receives a time-out.

%SS_LISTEN is used by stream socket server applications only.

Error codes returned by %SS_LISTEN

See the Socket Errors table for additional information about these errors.

SS_EADDRINUSE

SS_EBADF

SS_EDESTADDRREQ

SS_EINVAL

SS_EISCONN

SS_EMFILE

SS_ENETDOWN

SS_ENOBUFS

SS_ENOTSOCK

SS_EOPNOTSUPP

SS_EUNKNOWN

SS_NOTINITIALISED