예제 #1
0
        static void Main(string[] args)
        {
            byte clientId = 0;
            var  serv     = new TunnelServer(clientId, new IPEndPoint(IPAddress.Loopback, 8899));
            var  client   = new TunnelClient(clientId, Utils.DetectHost(), new IPEndPoint(IPAddress.Loopback, 8888));

            GlobalEventLoop.Instance().EventLoop();
        }
예제 #2
0
        static void Main(string[] args)
        {
            IPAddress remoteAddr = IPAddress.Parse(args[0]);

            byte thisClientId = 1;
            byte thisServerId = 2;

            if (args[1] == "1")
            {
                var temp = thisClientId;
                thisClientId = thisServerId;
                thisServerId = temp;
            }
            var serv   = new TunnelServer(thisServerId, new IPEndPoint(IPAddress.Loopback, 8899));
            var client = new TunnelClient(thisClientId, remoteAddr, new IPEndPoint(IPAddress.Loopback, 8888));

            GlobalEventLoop.Instance().EventLoop();
        }