You are here : Csys/socket.hgetsockname

getsockname() - sys/socket.h

The getsockname() function retrieves the locally-bound name of the specified socket, stores this address in the sockaddr structure pointed to by the address argument, and stores the length of this address in the object pointed to by the address_len argument. 


Syntax

int getsockname(int socket, struct sockaddr *address,socklen_t *address_len);


Example


Output / Return Value


Limitations


Alternatives / See Also


Reference