libcp2p icon indicating copy to clipboard operation
libcp2p copied to clipboard

Basic Networking - Part 3

Open bonedaddy opened this issue 5 years ago • 0 comments

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

bonedaddy avatar Jul 22 '20 06:07 bonedaddy