SetConnected() public method

public SetConnected ( ) : void
return void
コード例 #1
0
ファイル: TcpHandler.cs プロジェクト: nandub/DeOps
        public TcpConnect OnAccept(Socket socket, IPEndPoint source)
        {
            TcpConnect inbound = new TcpConnect(this);

            inbound.TcpSocket = socket;
            inbound.RemoteIP  = source.Address;
            inbound.TcpPort   = (ushort)source.Port; // zero if internet, actual value if sim
            inbound.SetConnected();

            // it's not until the host sends us traffic that we can send traffic back because we don't know
            // connecting node's dhtID (and hence encryption key) until ping is sent

            lock (SocketList)
                SocketList.Add(inbound);

            Network.UpdateLog("Tcp", "Accepted Connection from " + inbound.ToString());

            return(inbound);
        }
コード例 #2
0
ファイル: TcpHandler.cs プロジェクト: RoelofSol/DeOps
        public TcpConnect OnAccept(Socket socket, IPEndPoint source)
        {
            TcpConnect inbound = new TcpConnect(this);

            inbound.TcpSocket = socket;
            inbound.RemoteIP = source.Address;
            inbound.TcpPort = (ushort)source.Port;  // zero if internet, actual value if sim
            inbound.SetConnected();

            // it's not until the host sends us traffic that we can send traffic back because we don't know
            // connecting node's dhtID (and hence encryption key) until ping is sent

            lock (SocketList)
                SocketList.Add(inbound);

            Network.UpdateLog("Tcp", "Accepted Connection from " + inbound.ToString());

            return inbound;
        }