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.
5 years, 9 months ago.
Run socket concurrently with other code?
I am utilizing TCPEchoServer example code to build a ethernet commanded system.
How do I continuously monitor for a connection while running other code?
Ideally it would be something like:
Check for connection if connected: read buffer, execute parse else: run rest of program
I want to avoid threads and RTOS features for now.
My thoughts are that an interrupt could be used, but calling "TCPSocketConnection client;" stops the program until a connection has occurred. I have attempted to review the code and documentation however, I do not understand how this is instantiated (why it's blocking further execution).
Can anyone provide some more depth into how this should be done.
Also, could someone explain what part of the TCPSocketConnection e.g. codeline is responsible for the block?
Thanks kindly!