WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
status = %SS_BIND(socket, in_port, in_addr)
Returns SS_SUCCESS (0) or one of the errors in Error codes returned by %SS_BIND below. (n)
A descriptor of an open socket created by %SS_SOCKET. (i4)
The local internet port to associate with the socket or 0 (zero). (i4)
The local IPv4 address to associate with the socket or SS_INADDR_ANY. (i4)
%SS_BIND binds a name to an unbound socket. In_port and in_addr are used to name it.
If in_port is zero, a random port greater than 1023 is assigned. (Clients typically specify zero, while servers specify well-known ports.)
If in_addr is SS_INADDR_ANY, rather than associating a specific IP address with the socket, any appropriate network interface is used for sending or receiving data. This simplifies programming in the presence of multihomed hosts.
A connection-oriented client does not need to call %SS_BIND for a socket if it wishes to use a random port and any address, because %SS_CONNECT automatically performs this type of bind.
See the Socket Errors table for additional information about these errors.