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(); }
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(); }