cancel
Showing results for 
Search instead for 
Did you mean: 

setting a backlog, response issue with TCP Raw Socket Server

VSomasekhar
Associate
  1. How to set the number of simultaneous connections (backlog) in the Raw Socket Listen API? This is the relevant code snippet: /* start tcp listening for echo_pcb */ tcp_echoserver_pcb = tcp_listen( tcp_echoserver_pcb ); In contrast, the BSD/LWIP Sockets Listen API is: int lwip_listen(int s, int backlog)
  2. Do I have to enable this macro in opt.h for the above purpose? #define TCP_LISTEN_BACKLOG
  3. I am running a modified TCP Echo Server on the Board and sending continuous sequence of Modbus requests from the Modscan32 tool to the Modbus server running on the Board with STM32H723Zet6 MCU. But the response is given only to the first Request. The TCP Server is based on the source in the webpage: https://community.st.com/t5/stm32-mcus-embedded-software/how-to-send-data-lwip-tcp-server-to-client/td-p/119556
  4. How to modify the TCP Raw Socket Server mentioned above to send the response for all the request packets? As mentioned, the TCP Raw Socket Server is responding only once, that too after restart.
1 REPLY 1
STea
ST Employee

Hello @VSomasekhar,

By tweaking the options in lwipopts.h, it should be possible to receive more incoming connections: MEMP_NUM_TCP_PCB, MEMP_NUM_TCP_PCB_LISTEN, MEMP_NUM_NETCONN, etc...

You can refer to the following link for lwIP internal memory pool management: http://www.nongnu.org/lwip/2_0_x/group__lwip__opts__memp.html.

Refer to Solved: How to tune LwIP to receive more incoming connecti... - STMicroelectronics Community

Regards

 

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.