WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
status = %SS_GETSOCKNAME(socket, in_port, in_addr)
Returns SS_SUCCESS (0) or one of the errors in Error codes returned by %SS_GETSOCKNAME below. (n)
A descriptor of an open socket created by %SS_SOCKET. (i4)
Returned with the internet port of the socket. (i4)
Returned with the IPv4 address of the socket. (i4)
%SS_GETSOCKNAME returns the name of a socket, which is the local association. This function can be useful when an %SS_CONNECT call has been made without doing an %SS_BIND first; this call provides the only method of determining the local association set by the system.
If a socket was bound with SS_INADDR_ANY, indicating that any of the host’s IP addresses should be used for the socket, %SS_GETSOCKNAME does not necessarily return information about the host IP address, unless there has been a call to %SS_CONNECT or %SS_ACCEPT. This is because on a multihomed host, the IP address that will be used for the socket is unknown unless the socket is connected.
See the Socket Errors table for additional information about these errors.