TCPGetRemoteSocket


C Specification

#include <dolphin/ip.h>
typedef struct IPSocket
{
    u8 len; 		// IP_SOCKLEN
    u16 family;         // IP_INET
    u16 port;
    u8  addr[IP_ALEN];
} IPSocket;
s32 TCPGetRemoteSocket(TCPInfo* info, IPSocket* socket);

Description

TCPGetRemoteSocket() gets the remote socket (a pair of IP address and port number) connected to info.

Arguments

info Pointer to TCPInfo to get remote socket.
socket Pointer to IPSocket that receives the remote socket.

Return Values

IP_ERR_NONE Succeeded.
IP_ERR_INVALID info is not a valid TCPInfo.

See Also

IPSocket