TCP client/server library in C