Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 9 months ago.
tcp accept blocking
It there a way with the TCP stack to scan for an accept comming in? Now the process stops until the accept is granded by a remote connection. I would like to poll for a connect and continnue with the rest of the processes. For receive there is a way to continue when the return code is zero. But accept does not have such a feature. By the way I am just using the latest Ethernet stack with the TCP socket server.
9 years, 8 months ago.
//declaration TCPSocketServer server; TCPSocketConnection client; ... //in main section: server.bind(80); server.set_blocking(false); // Timeout after (1.5)s server.accept(client) ; //here wait 1.5 s and process next code