AnsweredAssumed Answered

RTCS TCP server socket doesn't accept the connection after disconnecting client 2 times

Question asked by Pravin Falcao on Jan 29, 2015
Latest reply on Feb 3, 2015 by Carlos_Musich

Hi,

 

I have a TCP-IP server with two clients respectively on Port 81 and Port 82. Interesting thing is when I disconnect the client and reconnect, it works fine for exactly two times. However after trying to connect 3rd time, 'RTCS_selectset' throws an error message 'RTCS_SOCKET_ERROR' and connection fails permanently until I jump to RTCS/TCP-IP socket initialization.

 

However in field application, disconnection is frequent and I can not restart my K70 board if this happens. Again assume when Port 81 failed permanently after above scenario, Port 82 is still working fine with send-receive as it has not been disconnected - reconnected for 2 times. Can anyone help me in this?

E.g. One scenario

Port 81 -  Connect (works) - Disconnect - Connect (works) - Disconnect - Connect (doesn't works). == Port 81 dead until re initialization of RTCS/TCP  ==

Port 82 - Connect (works) - No Action    - No Action           - Disconnect - Connect (works)            - No Action  -  Disconnect - Connect (doesn't works). == Port 82 dead until re initialization of RTCS/TCP  ==

Outcomes