server code in C