First draft of the TCP server