...
net_sock.h/net_sock.c
net_bsd.h/net_bsd.c
Prototypes
| Code Block |
|---|
NET_SOCK_ID NetSock_Open(NET_SOCK_PROTOCOL_FAMILY protocol_family,
NET_SOCK_TYPE sock_type,
NET_SOCK_PROTOCOL protocol,
NET_ERR *p_err);
int socket (int protocol_family,
int sock_type,
int protocol); |
Arguments
protocol_family
This field establishes the socket protocol family domain. Always use NET_SOCK_FAMILY_IP_V4/PF_INET or NET_SOCK_FAMILY_IP_V6/PF_INET6 for TCP/IP sockets.
...
The table below shows you the different ways you can specify the three arguments.
TCP/IP Protocol | Arguments | |||||
protocol_family | sock_type | protocol | ||||
UDP |
|
|
| |||
UDP |
|
|
| |||
TCP |
|
|
| |||
TCP |
|
|
| |||
...