Пример #1
0
            public CustomAspNetChannelStack(TcpLayer tcpLayer)
            {
                _tcpLayer = tcpLayer;

                CustomAspNetChannel channel = new CustomAspNetChannel();
                channel.LowerLayer = tcpLayer;
                tcpLayer.UpperLayer = channel;

                channel.RequestEnded += new EventHandler(channel_RequestEnded);
            }
Пример #2
0
 /// <summary>
 /// Creates a new FastCgiChannel
 /// </summary>
 /// <param name="tcpLayer">Lower <see cref="TcpLayer"/> used to communicate with the web server</param>
 protected abstract IChannel CreateChannel(TcpLayer tcpLayer);
Пример #3
0
 /// <summary>
 /// Creates a new FastCgiChannel
 /// </summary>
 /// <param name="tcpLayer">Lower <see cref="TcpLayer"/> used to communicate with the web server</param>
 protected abstract IChannel CreateChannel(TcpLayer tcpLayer);
Пример #4
0
 private void RunChannel(TcpClient client)
 {
     try
     {
         TcpLayer tcpLayer = new TcpLayer(client);
         this.CreateChannel(tcpLayer);
         tcpLayer.Run();
     }
     catch (Exception ex)
     {
         this.OnChannelError(new UnhandledExceptionEventArgs(ex, false));
     }
 }
Пример #5
0
 /// <summary>
 /// Creates a new FastCgiChannel
 /// </summary>
 /// <param name="tcpLayer">Lower <see cref="TcpLayer"/> used to communicate with the web server</param>
 protected abstract void CreateChannel(TcpLayer tcpLayer);
Пример #6
0
 private SimpleChannel CreateUpperLayer(TcpLayer tcpLayer)
 {
     var channel = new SimpleChannel();
     channel.LowerLayer = tcpLayer;
     channel.RequestEnded += new EventHandler(RequestEnded);
     return channel;
 }
Пример #7
0
 public SimpleChannelStack(TcpLayer tcpLayer)
 {
     _tcpLayer = tcpLayer;
     _tcpLayer.UpperLayer = this.CreateUpperLayer(tcpLayer);
 }
Пример #8
0
 protected override IChannel CreateChannel(TcpLayer tcpLayer)
 {
     return new SimpleChannelStack(tcpLayer);
 }
Пример #9
0
 public SimpleChannelStack(TcpLayer tcpLayer, Action endedCallback = null)
 {
     _endedCallback = endedCallback;
     _tcpLayer = tcpLayer;
     _tcpLayer.UpperLayer = this.CreateUpperLayer(tcpLayer);
 }
Пример #10
0
 protected override IChannel CreateChannel(TcpLayer tcpLayer)
 {
     return new SimpleChannelStack(tcpLayer, this.OnRequestEnded);
 }
Пример #11
0
 protected override void CreateChannel(TcpLayer tcpLayer)
 {
     //new SimpleChannelStack(tcpLayer);
     new CustomAspNetChannelStack(tcpLayer);
 }
Пример #12
0
            public SimpleChannelStack(TcpLayer tcpLayer)
            {
                _tcpLayer = tcpLayer;

                SimpleChannel channel = new SimpleChannel();
                channel.LowerLayer = tcpLayer;
                tcpLayer.UpperLayer = channel;

                channel.RequestEnded += new EventHandler(channel_RequestEnded);
            }