AnsweredAssumed Answered

Maximum load for 2 connections causes 1 connectino to drop (TCP/IP) RTCS

Question asked by Peter Mai on Aug 14, 2017
Latest reply on Aug 16, 2017 by Daniel Chen

Hello everybody, 

 

see the headline. If I do a maximum load for 2 connections, one connection drops. And which connection drops seems to follow some rule I do not understand. It works fine if I reduce the load. 

 

 
Anybody has an idea?

 

 

Briefly:
The sockets are configured as stream sockets:

       sockets.sock4_tcp_handle = socket(PF_INET, SOCK_STREAM, 0);
and do listen via:

      u32Error = listen(sockets.sock4_tcp_handle, 0);
An accept creates a new child socket:

      au32ETHSock[tcp_u8FreeToUseConnectionID] = accept(sockets.sock4_tcp_handle, NULL, NULL);

 

And then a new task is created for this socket ..........

 

Every task is in a while(1) loop with a unique u32NewSocket_handle and a unique pau8RecvBufferTCP

      while(1)

      {
         u32NumOfRecvByte = recv(u32NewSocket_handle, pau8RecvBufferTCP, ETHBUFFER_SIZE,          MSG_DONTWAIT);
      }

 

Thank you very much for your help!

Outcomes