Exemplo n.º 1
0
        public void Connect(IPEndPoint server)
        {
            if (ConnectionState != ConnectionState.Disconnected)
            {
                return;
            }

            ServerAddress = server;

            ConnectionState = ConnectionState.Connecting;

            Socket = new LengthedSocket(LengthedSocket.SizeType.Word);
            Socket.BeginConnect(ServerAddress, EndConnect, null);
        }