Multithreaded chat server/client written in C