You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
help?> getsockname
search: getsockname
getsockname(sock::Union{TCPServer, TCPSocket}) -> (IPAddr, UInt16)
Get the IP address and the port that the given TCPSocket is connected to (or bound to, in the case of TCPServer).
UNIX:
int
getsockname(int socket, struct sockaddr *restrict address, socklen_t *restrict address_len);
DESCRIPTION
The getsockname() function returns the current address for the specified socket.
int
getpeername(int socket, struct sockaddr *restrict address, socklen_t *restrict address_len);
DESCRIPTION
The getpeername() function returns the address of the peer connected to the specified socket.
Julia's getsockname is equivalent to UNIX's getsockname for TCPServer. For TCPSocket it is equivalent to getpeername -
Julia's
getsockname
:UNIX:
Julia's
getsockname
is equivalent to UNIX'sgetsockname
forTCPServer
. ForTCPSocket
it is equivalent togetpeername
-julia/base/socket.jl
Lines 847 to 855 in 1129de3
I suggest we mirror standard UNIX definitions and introduce a
getpeername
.The text was updated successfully, but these errors were encountered: