Replacing TcpClient with Socket.