simple example to run server and 2 clients in the same thread