UDPConnect


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 UDPConnect ( UDPInfo* info, const IPSocket* socket );

Description

UDPConnect() assigns the remote (destination) socket to UDPInfo. If local socket is unspecified, an ephemeral local port number will be automatically chosen.

Arguments

info UDP info to which assign the remote socket.
socket A pair of IP address and UDP port number.

Return Values

IP_ERR_NONE Succeeded.
IP_ERR_INV_SOCKET Specified socket address is not valid.
IP_ERR_UNREACHABLE Specified socket is unreachable from this machine.
IP_ERR_EXIST Specified socket is already in use.
IP_ERR_INVALID info is not a valid UDPInfo. Specified socket is not valid.
IP_ERR_INS_RESOURCES Used up ephemeral local ports.

See Also

IPSocket