NetTCP_ConnCfgTxAckImmedRxdPushEn

Configure TCP connection’s transmit immediate acknowledgement for received and pushed TCP segments.

Files

net_tcp.h/net_tcp.c

Prototype

          CPU_BOOLEAN NetTCP_ConnCfgTxAckImmedRxdPushEn(NET_TCP_CONN_ID  conn_id_tcp,
                                                        CPU_BOOLEAN      tx_immed_ack_en,
                                                        NET_ERR         *perr);

Arguments

conn_id_tcp

TCP connection handle ID to configure transmit immediate acknowledgement for received and pushed TCP segments.

tx_immed_ack_en

Desired value for TCP connection transmit immediate acknowledgement for received and pushed TCP segments:

DEF_ENABLED

TCP connection acknowledgements immediately transmitted for any pushed TCP segments received.

DEF_DISABLED

TCP connection acknowledgements not immediately transmitted for any pushed TCP segments received.


perr

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,

TCP connection’s transmit immediate acknowledgement for received and pushed TCP segments successfully configured, if no errors.

DEF_FAIL,

otherwise.

Required Configuration

Available only if TCP is enabled (see TCP Layer Configuration).

Notes / Warnings

The 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 NetSock_GetConnTransportID):

          NET_SOCK_ID     sock_id;
          NET_TCP_CONN_ID conn_id_tcp;
          NET_ERR         err;
           
          sock_id     = Application's TCP socket ID; /* Get application's TCP socket     ID. */
                                                     /* Get socket's      TCP connection ID. */
          conn_id_tcp = (NET_TCP_CONN_ID)NetSock_GetConnTransportID(sock_id, &err);
           
          if (err == NET_SOCK_ERR_NONE) {
                              /* If NO errors, ...                                                      */
                              /* ... configure TCP connection transmit immediate ACK for received PUSH. */
              NetTCP_ConnCfgTxAckImmedRxdPushEn(conn_id_tcp, DEF_NO);
          }

NetTCP_ConnCfgTxAckImmedRxdPushEn() 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 “net.h Note #3”). This is required since an application's network protocol suite API function access is asynchronous to other network protocol tasks
.