예제 #1
0
        public void ReconnectTest()
        {
            TcpSocket socket = new TcpSocket();

            Assert.IsFalse(socket.Connected);

            socket.Connect(new DnsEndPoint("www.google.com", 80));
            Assert.IsTrue(socket.Connected);

            socket.Dispose();
            Assert.IsFalse(socket.Connected);

            socket.Reconnect();
            Assert.IsTrue(socket.Connected);
        }