echo server, single thread and multi th