Multithreaded TCP server 'framework' written in C