/
getsockname TCP UDP
getsockname TCP UDP
Populates the locally-bound name for the socket specified into the sockaddr provided.
Files
net_bsd.h/net_bsd.c
Prototype
int getsockname ( int sock_id, struct sockaddr *addr, socklen_t *addrlen)
Arguments
sock_id
This is the socket ID returned by NetSock_Open()/socket()
when the socket was created.
addr
Pointer to a struct sockaddr instance that will be populated with the socket's info.
addrlen
Pointer to a socklen_t variable that will get the length of the socket's address.
Returned Value
0
, if no errors.
-1
, otherwise.
Related content
getpeername TCP UDP
getpeername TCP UDP
More like this
socket TCP UDP
socket TCP UDP
More like this
getnameinfo TCP UDP
getnameinfo TCP UDP
More like this
getsockopt TCP UDP
getsockopt TCP UDP
More like this
gethostname TCP UDP
gethostname TCP UDP
More like this
bind TCP UDP
bind TCP UDP
More like this