![]() |
![]() |
![]() |
Get the name of a socket
#include <sys/socket.h> int getsockname( int s, struct sockaddr * name, size_t * namelen );
libsocket
The getsockname() function returns the current name for the specified socket. The namelen parameter indicates the amount of space pointed to by name. On return, namelen contains the actual size of the name (in bytes).
Standard Unix, POSIX 1003.1g (draft)
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | No |
Thread | Yes |
![]() |
![]() |
![]() |