boilerplate server code in c