Results 11 to 11 of 11
For a chat server, I would definitely use select(), no doubt. Only problem is that almost makes it too easy... =) Just keep a list of client structs and some ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 04-30-2003 #11
- Join Date
- Oct 2001
- Täby, Sweden
Just keep a list of client structs and some sort of ring buffer for data buffering, where the clients will just have different tail values (if their connections are too slow, they'll just have themselves to blame for missing out on data). It will be the easiest thing in the world. You could probably get it under 100 lines.
Really, threads are just unnecessary bloat for such an easy project. It might be a fun project to experiment on with thread usage, if you want to train on it.