Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Populates the locally-bound name for the socket specified into the sockaddr provided.

Files

net_bsd.h/net_bsd.c

Prototype

Code Block
languagecpp
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.

...

Pointer to a socklen_t variable that will get the length of the socket's address.


Returned Value

0, if no errors.

-1, otherwise.

...