A simple chat server monothread and multiuser in c