Controlling Socket Blocking Options
Socket blocking options may be configured during compile time by adjusting the net_cfg.h
macro NET_SOCK_CFG_BLOCK_SEL
to the following values:
NET_SOCK_BLOCK_SEL_DFLT
NET_SOCK_BLOCK_SEL_BLOCK
NET_SOCK_BLOCK_SEL_NO_BLOCK
NET_SOCK_BLOCK_SEL_DFLT selects blocking as the default option, however, allows run-time code to override blocking settings by specifying additional socket.
NET_SOCK_BLOCK_SEL_BLOCK configures all sockets to always block.
NET_SOCK_BLOCK_SEL_NO_BLOCK
configures all sockets to non blocking.
See the section C-13-46 and section C-13-48 for more information about sockets and blocking options.
Specific Socket Option API
µC/TCP-IP provides a set of APIs to configure sockets on an individual basis. These APIs are listed below and detailed in Network Socket Functions:
NetSock_CfgBlock() (TCP/UDP)
NetSock_CfgSecure() (TCP)
NetSock_CfgRxQ_Size() (TCP/UDP)
NetSock_CfgTxQ_Size() (TCP/UDP)
NetSock_CfgTxIP_TOS() (TCP/UDP)
NetSock_CfgTxIP_TTL() (TCP/UDP)
NetSock_CfgTxIP_TTL_Multicast() (TCP/UDP)
- NetSock_CfgTimeoutConnAcceptDflt() (TCP)
NetSock_CfgTimeoutConnAcceptGet_ms() (TCP)
NetSock_CfgTimeoutConnAcceptSet() (TCP)
NetSock_CfgTimeoutConnCloseDflt() (TCP)
NetSock_CfgTimeoutConnCloseGet_ms() (TCP)
NetSock_CfgTimeoutConnCloseSet() (TCP)
NetSock_CfgTimeoutConnReqDflt() (TCP)
NetSock_CfgTimeoutConnReqGet_ms() (TCP)
NetSock_CfgTimeoutConnReqSet() (TCP)
NetSock_CfgTimeoutRxQ_Dflt() (TCP/UDP)
NetSock_CfgTimeoutRxQ_Get_ms() (TCP/UDP)
NetSock_CfgTimeoutRxQ_Set() (TCP/UDP)
NetSock_CfgTimeoutTxQ_Dflt() (TCP)
NetSock_CfgTimeoutTxQ_Get_ms() (TCP)
NetSock_CfgTimeoutTxQ_Set() (TCP)
Generic Socket Option API
µC/TCP-IP provides two APIs to read and configure socket option values. These APIs are listed below and detailed in Network Socket Functions:
Their BSD equivalent are listed below. See also BSD Functions.