Single thread tcp-server