using a threaded tcp server for testing