Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Close an application socket, with error handling. See section C-13-31 for more information.

Files

net_app.h/net_app.c

Prototype

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.

timeout_ms

Socket close timeout value per attempt/retry.

perr

Pointer to variable that will receive the error code from this function:

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

Available only if NET_APP_CFG_API_EN is enabled (see section D-18-1) and either NET_CFG_TRANSPORT_LAYER_SEL is configured for TCP (see section D-12-1) and/or NET_UDP_CFG_APP_API_SEL is configured for sockets (see section D-13-1).

Notes / Warnings

Some socket arguments and/or operations are validated only if validation code is enabled (see section D-3-1).

  • No labels