SOL_TCP OPT_CONNECT_TIMEOUT inconsistent

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SOL_TCP OPT_CONNECT_TIMEOUT inconsistent

507 Views
johannesschock
Contributor II

I think either the implementation or documentation of OPT_CONNECT_TIMEOUT is wrong:

The implementation and usage of OPT_CONNECT_TIMEOUT is a timeout during calls to connect(). Typical values (e.g. FTP-Server) are 5000ms.

The documentation (Freescale MQX™ RTOS RTCS™ User’s Guide, Rev. 16, page 282) mentions:

     Connect Timeout:

     Option name OPT_CONNECT_TIMEOUT

     Protocol level SOL_TCP

     Values >= 180,000 (RTCS maintains the connection for this number of

     milliseconds).

     Default value 480,000 (eight minutes).

Which sounds like a connection inactivity timeout, because 3 minutes minimum timeout for a call to connect is way too high.

Can anyone please clarify?

Regards, Johannes Schock

Labels (1)
0 Kudos
1 Reply

268 Views
RadekS
NXP Employee
NXP Employee

Yes, you are right.

In fact, OPT_CONNECT_TIMEOUT is timeout for waiting on acknowledge. It means that this timeout is applied in both cases – for connect request and also for session inactivity.

We agree that eight minutes is really long time (based on RFC recommendation). You can change it, but 3 minutes is currently minimum time.

From next version of RTCS (MQX4.2, probably April 2015), default values of this timeout will be decreased to 3 minutes and limitation for minimum value will be removed (you will be able change it to for example 10 seconds)

I hope it helps you.


Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos