Hello,
I am evaluating what the best way is to solve this problem:
We have 2 network interfaces on our board. We would like to be able to switch between them dynamically.
Many other threads need network functionality.
Idea:
Have a networking thread that receives requests (open socket, write data, close socket) from other threads, and forwards received data to them.
What would be the best way to implement this?
- Other threads call functions that alter state of networking thread
- Other threads queue requests in a FIFO for example, and the networking thread responds in their FIFOs
- No networking thread, but then all threads must do their own socket management and stuff
I would very much appreciate some insight to help me decide the best solution! Thank you