Embedded TCP/IP stack  4.7.0

◆ fnet_socket_getpeername()

fnet_return_t fnet_socket_getpeername ( fnet_socket_t  s,
struct fnet_sockaddr name,
fnet_size_t namelen 
)

Retrieves the name of a peer connected to a socket.

Parameters
sDescriptor identifying a connected socket.
nameStructure that receives the name (address) of the peer.
namelenPointer to the size of the name structure.
Returns
This function returns:
See also
fnet_socket_getname()

This function retrieves the name of the peer connected to the socket s and stores it in the fnet_sockaddr structure identified by name.
The fnet_socket_getpeername() function can be used only with a connected socket. For datagram sockets, only the name of a peer specified in a previous fnet_socket_connect() call will be returned - any name specified by a previous fnet_socket_sendto() call will not be returned by the fnet_socket_getpeername().


© 2005-2020 by Andrej Butok. http://fnet.sourceforge.net