RTCSCFG_TCP_MAX_HALF_OPEN and RTCSCFG_TCP_MAX_CONNECTIONS setting in mqx4.1?

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

RTCSCFG_TCP_MAX_HALF_OPEN and RTCSCFG_TCP_MAX_CONNECTIONS setting in mqx4.1?

1,000 Views
wulinweng
Contributor II

Dear Support:

how can I set the RTCSCFG_TCP_MAX_CONNECTIONS and RTCSCFG_TCP_MAX_HALF_OPEN in MQX4.1 for our project if I want to use them?

Thank you.

BR,

0 Kudos
3 Replies

632 Views
danielchen
NXP TechSupport
NXP TechSupport

HI Wulin:

You can put these macro definition in user_config.h or rtcs_user_config.h

At the TCP level, the default RTCS setting is to allow unlimited TCP connections (RTCSCFG_TCP_MAX_CONNECTIONS = 0) ,     If RTCSCFG_TCP_MAX_HALF_OPEN is set to non-zero positive value, RTCS tries to monitor the half open connections and it drops older half open connections if a new connection request is received.

At application level, http server, ftpd server or telneted server may give additional limits for connected clients.

For example to allow multiple clients for http server, when a client connects to the server, the server task creates a child task to handle communication with the accepted socket, so a memory for the child task's stack is needed. There is one child task for each connected client.

At Ethernet level, the low driver has to have resource to handle each active socket--like PCB, memory blocks for socket. memory pools.

There is no exact value you need to set ,it depends your system. If you have a system with large memory, you can allow multiple clients.

I would recommend to debug with TAD. There you can see how much memory is left after RTCS_create, after socket init, application layer init, like httsrv start, after a connection from client is accepted.

I hope it helps

Have a great day,
Daniel

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

0 Kudos

632 Views
wulinweng
Contributor II

Can you give me some suggestion for the cpu K64F120M about the two definition values?

Mike-WuLin Weng

ABB Xiamen Low Voltage Equipment Company Limited

No.12-20, 3rd Chuang Xin Road Xiamen SEZ, Fujian 361006 P.R.China

Phone: +86 592 5767829

Mobile: +86 181 5089 0831

email: mike-wulin.weng@cn.abb.com<mailto:mike-wulin.weng@cn.abb.com>

0 Kudos

632 Views
danielchen
NXP TechSupport
NXP TechSupport

For K64F120M, if there is no special requirement, I would recommend to use the default value.

Regards

Daniel

0 Kudos