I set my TCP Server in the SOCK_LISTEN (S0_SR = 0x14) all the time, so it can receive and immediately reply to a request from a peer every 100ms. I am polling S0_SR every 10ms, and everything works fine. However, the broadcast “Who has…” crew up my app …???
After receiving a broadcast message, my S0_SR was changed to 0x01, 0x02, and 0x03 with S0_IR interrupt (CON, RECV, SEND_OK). After that, my code puts it back to the SOCK_LISTEN mode again. During the broadcast, I lost several requests from my peer, and finally the peer sent a DISCONN request.
Is there anyway to avoid the response to the broadcast or any work around this, please help.
Thank you very much.