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.
2 years, 7 months ago.
Multiple sockets one EthernetInterface?
I have an application that acts as a UDP server on one socket. I also want to have a second reliable channel (TCP socket) for commands and bootloader. If I declared two sockets as such
TCPServer serv; // or TCPSocket.. UDPSocket socket;
Bound to the same..
Then I crash.
However if i bind to separate...
EthernetInterface net; EthernetInterface tcp_eth;
Then the code will run and work... very inconsistently and nondeterministically.
My intuition would be that there would be a singular "EthernetInterface" object and multiple child sockets for such a topology.
Anybody have experience here?