After reading the Beej's guide to networking programming [1], I wondered what could be the simplest approach to making a multiclient socket server using unix pthreads/mutexes. I ended up writing [2] (C++), mostly as an exercise. Although I have never tested it properly nor I consider myself to be a great programmer, it seems to work. Not something to learn from, though. Anyway, any feedback is really appreciated.
[1] http://beej.us/guide/bgnet/
[2] https://github.com/raaapha/multichat