Close an application socket, with error handling. See section NetSock_Close() for more information.
Files
net_app.h/net_app.c
Prototype
Code Block |
---|
CPU_BOOLEAN NetApp_SockClose (NET_SOCK_ID sock_id,
CPU_INT32U timeout_ms,
NET_ERR *p_err); |
Arguments
sock_id
This is the socket ID returned by NetApp_SockOpen()/
NetSock_Open()/socket()
when the socket was created or by NetApp_SockAccept()/NetSock_Accept()/accept()
when a connection was accepted.
...
NET_APP_ERR_NONE
NET_APP_ERR_INVALID_ARG
NET_APP_ERR_FAULT
NET_APP_ERR_FAULT_TRANSITORY
Returned Value
DEF_OK
,
Application socket successfully closed.
DEF_FAIL
,
otherwise.
Required Configuration
None.
Notes / Warnings
Some socket arguments and/or operations are validated only if validation code is enabled (see section Argument Check Configuration).