Open topic with navigation
WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
status = %SS2_GETSOCKNAME(socket, in_port, in_addr6)
Returns SS_SUCCESS (0) or one of the errors in Error codes returned by %SS2_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 IPv6 address of the socket. ([#]byte)
%SS2_GETSOCKNAME returns the name of a socket, which is the local association. This function can be useful when an %SS2_CONNECT call has been made without doing an %SS2_BIND first; this call provides the only method of determining the local association set by the system.
If a socket was bound with the in_addr6 argument set to 0, indicating that any of the host’s IP addresses may be used for the socket (see the note for %SS2_BIND), %SS2_GETSOCKNAME does not necessarily return information about the host IP address, unless there has been a call to %SS2_CONNECT or %SS2_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.