Ejemplo n.º 1
0
        private void CreateInternalServer()
        {
            InternalSocketServer = CreateSocketServer();

            InternalSocketServer.Bind(new IPEndPoint(IPAddress.Loopback, 0));
            InternalSocketPort = ((IPEndPoint)(InternalSocketServer.LocalEndPoint)).Port;

            HttpProxyURL = new Uri($"http://127.0.0.1:{InternalSocketPort}");

            InternalSocketServer.Listen(512);
            InternalSocketServer.BeginAccept(new AsyncCallback(AcceptCallback), null);
        }