Advertisement

How one thread listens to many sockets (or files) at the same time with select().

How one thread listens to many sockets (or files) at the same time with select(). Ever wondered how to concurrently monitor multiple network connections (sockets) without creating multiple threads? This video shows you how with select(), a universally-available call that so many programmers don't know exists. This is a network-oriented video that shows how select works in a socket server example, written in C, but this technique works with any file descriptor, including files and pipes.

This is also the first of what I expect to be a series of videos on asynchronous I/O and event-driven systems.

Related videos (playlist):


About me: I'm a computer scientist, researcher, teacher, and Internet of Things enthusiast. I teach systems and networking courses at Clemson University. I lead the PERSIST research lab.

More about me and what I do:




To Support the Channel:
+ like, subscribe, spread the word
+ contribute via Patreon --- [

Source code is also available to Patreon supporters. --- [
Note: I haven't posted ALL of the code from ALL of my videos yet. The site contains code from my recent tutorials (I wasn't quite as organized in the pre-2019 past). I will add examples from older videos as I dig them up.

programming,C programming,c/c++,sockets,client,server,select,file descriptor,

Post a Comment

0 Comments