Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

TCP Functions

...

NetTCP_ConnCfgIdleTimeout()

...

1351828Configure TCP connection’s idle timeout. Anchor13518291351829

Files

Anchor13517701351770net_tcp.h/net_tcp.c Anchor13517771351777 Prototype

...

rowspan2

...

Prototype

 

Arguments

conn_id_tcp Anchor13517801351780

TCP connection handle ID to configure connection handle timeout.

Anchor13517811351781timeout_secanchor13517821351782

Desired value for TCP connection idle timeout (in seconds).

...

perr Anchor13517841351784

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

...

...

NET_TCP_ERR_NONE

...

NET_TCP_ERR_INVALID_ARG

...

NET_TCP_ERR_INVALID_CONN

...

NET_TCP_ERR_CONN_NOT_USED

...

NET_ERR_INIT_INCOMPLETE

...

NET_OS_ERR_LOCK

...

...

Returned Value

...

DEF_OK, Anchor13521391352139

TCP connection’s idle timeout successfully configured.

Anchor13521401352140DEF_FAIL, Anchor13517951351795

otherwise.

...

Required Configuration

Anchor13517991351799Available only if NET_CFG_TRANSPORT_LAYER_SEL is configured for TCP (see section D-12-1 on page 755).anchor13518011351801

Notes / Warnings

...

1351763Configured timeout does not reschedule any current idle timeout in progress but becomes effective the next time a TCP connection sets its idle timeout.

Anchor13525601352560The conn_id_tcp argument represents the TCP connection handle – not the socket handle. The following code may be used to get the TCP connection handle and configure TCP connection parameters (see also section C-13-38 “NetSock_GetConnTransportID()” on page 644):

Anchor14529911452991 

...

rowspan10

...

...

 

...

...

NetTCP_ConnCfgIdleTimeout(

...

)

...

Anchor13525551352555 NetTCP_ConnCfgIdleTimeout() is called by application function(s) and must not be called with the global network lock already acquired. It must block all other network protocol tasks by pending on and acquiring the global network lock (see “netnet.h Note #3”). This is required since an application's network protocol suite API function access is asynchronous to other network protocol tasks.