Beispiel #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="logger">The logger</param>
        /// <param name="config">Configuration for the server</param>
        public FullHttpProxyServer(HttpProxyServerConfig config, Logger logger)
            : base(logger)
        {
            _config = config;

            NetGraphBuilder builder = new NetGraphBuilder();

            ClientEndpointFactory client = builder.AddClient("Client", Guid.NewGuid());
            ServerEndpointFactory server = builder.AddServer("Server", Guid.NewGuid());

            DirectNodeFactory nop = builder.AddNode(new DirectNodeFactory("NOP", Guid.NewGuid()));

            builder.AddLines(client, nop, server, client);

            _factory = builder.Factory;
        }
Beispiel #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="logger">The logger</param>
        /// <param name="config">Configuration for the server</param>
        public FullHttpProxyServer(HttpProxyServerConfig config, Logger logger)
            : base(logger)
        {
            _config = config;

            NetGraphBuilder builder = new NetGraphBuilder();

            ClientEndpointFactory client = builder.AddClient("Client", Guid.NewGuid());
            ServerEndpointFactory server = builder.AddServer("Server", Guid.NewGuid());

            DirectNodeFactory nop = builder.AddNode(new DirectNodeFactory("NOP", Guid.NewGuid()));

            builder.AddLines(client, nop, server, client);

            _factory = builder.Factory;
        }