libcp2p
libcp2p copied to clipboard
Basic Networking - Part 3
Overview
Given that embedded systems have limited available threads, it is important that we dont consume all threads by creating tasks to handle each and every new connection. Instead we should have a single thread responsible for handling new connections. Whenever new connections are received, we add the corresponding file descriptors to one mega list of all active file descriptors.
The thread responsible for handling new connections can then check which file descriptors are ready for reading/writing, and handling them accordingly
Expected Outcome
- A dedicated thread handles all connections