#include <cafe.h> #include <cafe/network.h> int SOGetSockName(int fd, struct sockaddr *name, int *addrlen);
|fd||Descriptor of socket from which the name is to be retrieved.|
|name||Destination buffer into which the retrieved name will be placed.|
|addrlen||Initialized with the length of the name; upon return will contain the actual length of the returned name.|
0 upon success. Upon failure,
-1 is returned and
errno is set appropriately.
||Socket library is not initialized.|
||Insufficient memory in the stack.|
||Specified argument is not a socket.|
||Invalid operation occurred in the stack.|
||Socket resource manager busy processing requests.|
||Indicates the operation was aborted. For example, this error can be returned for calls blocked on a socket after the socket is closed by another thread.|
||Internal API error, invalid error code.|
||Internal API error.|
Retrieves the current name for the specified socket.
|Callbacks||Do not call this function from any callback function.|
|Interrupt handler||Do not call this function from any interrupt handler.|
|Exception handler||Do not call this function from any exception handler.|
2012/08/16 Cleanup pass.
2011/07/11 Added Errors section.
2011/02/21 Initial version.