Simple echo server in C