%SS_GETPEERNAME

Return the name of the peer socket (IPv4)

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
status = %SS_GETPEERNAME(socket, in_port, in_addr)

Return value

status

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

Arguments

socket

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

in_port

Returned with the internet port of the peer. (i4)

in_addr

Returned with the IPv4 address of the peer. (i4)

Discussion

%SS_GETPEERNAME returns the name of the peer for a connected stream socket or a datagram socket with an established peer address.

Error codes returned by %SS_GETPEERNAME

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

SS_EBADF

SS_ENETDOWN

SS_ENOBUFS

SS_ENOMEM

SS_ENOTCONN

SS_ENOTSOCK

SS_EUNKNOWN

SS_NOTINITIALISED