Multithreaded C server