Determining local and remote names

WSPGetSockName is used to retrieve the local address for bound sockets. This is especially useful when a WSPConnect call has been made without doing a WSPBind first; WSPGetSockName provides the only means to determine the local association which has been set implicitly by the provider.

After a connection has been setup, WSPGetPeerName can be used to determine the address of the peer to which a socket is connected.