コード例 #1
0
ファイル: WmAnpTunnel.cs プロジェクト: tmbx/kwm-ng
        protected override void Run()
        {
            // Connect the tunnel.
            InternalAnpTunnel = new AnpTunnel(Host, Port);
            Tunnel tunnel = InternalAnpTunnel.GetTunnel();

            InternalAnpTunnel.BeginConnect(ReconnectHost, ReconnectPort);

            while (true)
            {
                SelectSockets set = new SelectSockets();
                set.Timeout = 100;
                tunnel.CheckTls();
                set.AddRead(tunnel.Sock);
                Block(set);
                if (set.ReadSockets.Contains(tunnel.Sock))
                {
                    InternalAnpTunnel.CreateTransport();
                    break;
                }
            }

            // Handle the tunnel.
            OnTunnelConnected();
        }
コード例 #2
0
ファイル: WmAnpTunnel.cs プロジェクト: tmbx/kwm-ng
 public AnpTunnel(string _host, int _port)
 {
     tunnel = new Tunnel(_host, _port);
 }
コード例 #3
0
ファイル: WmAnpTunnel.cs プロジェクト: tmbx/kwm-ng
 public AnpTunnel(string _host, int _port)
 {
     tunnel = new Tunnel(_host, _port);
 }