#include <oskit/net/socket.h>oskit_error_t oskit_socket_getpeername(oskit_socket_t *s, [out] struct oskit_sockaddr *asa, [in/out] oskit_size_t *anamelen);
getpeername returns the name of the peer connected to socket s.
- s
- The socket connected to the peer whose name is to be returned.
- name
- Contains the peer's name upon return.
- anamelen
- Initially, the amount of space pointed to by name, on return it will contain the amount actually used. The name is truncated if the buffer provided is too small.
Returns 0 on success, or an error code specified in <oskit/error.h>, on error.