Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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 erros.

-1, otherwise



  • No labels