This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

recv() returns BSD_ESOCK on listening socket

Hi,
MDK MDK-Plus 7.18.0 over RTX5, compiled with ARM Compiler 6 in uVision 5

I'm using BSD API in non-blocking mode.

This is a complex project (Mongoose, https://mongoose.ws) but basically the problem is with a TCP server,

Open socket, listen, clients connect, accept, configure socket, read/write, and suddenly one of the sockets starts returning BSD_ESOCK to recv() until it is closed.

I have 10 TCP sockets, 10 BSD sockets, 1 listener, and I call `listen()` with a backlog of 5. I don't have more than 3 simultaneous connections, this mostly happens with the second socket after the third connection

Error checking removed for clarity (but done), these are the calls to MDK-Plus, is there anything wrong with this ?

0