Go to the previous, next section.
int getsockname(int s, struct sockaddr *name, int *
namelen);
s: [in] the socket accessed.
name: [out] the buffer where to put the name in.
namelen: [in out] on entry, the maximum length of name. On return, it contains the actual length of the name.
Gets the local socket name.
On success zero is returned. On error, -1 is returned and errno
is
set to one of the following values:
EBADF
, ENOTSOCK
, ENOBUFS
and EFAULT
.
Go to the previous, next section.