a server based on tcp connection