public CustomAspNetChannelStack(TcpLayer tcpLayer) { _tcpLayer = tcpLayer; CustomAspNetChannel channel = new CustomAspNetChannel(); channel.LowerLayer = tcpLayer; tcpLayer.UpperLayer = channel; channel.RequestEnded += new EventHandler(channel_RequestEnded); }
/// <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);
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)); } }
/// <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);
private SimpleChannel CreateUpperLayer(TcpLayer tcpLayer) { var channel = new SimpleChannel(); channel.LowerLayer = tcpLayer; channel.RequestEnded += new EventHandler(RequestEnded); return channel; }
public SimpleChannelStack(TcpLayer tcpLayer) { _tcpLayer = tcpLayer; _tcpLayer.UpperLayer = this.CreateUpperLayer(tcpLayer); }
protected override IChannel CreateChannel(TcpLayer tcpLayer) { return new SimpleChannelStack(tcpLayer); }
public SimpleChannelStack(TcpLayer tcpLayer, Action endedCallback = null) { _endedCallback = endedCallback; _tcpLayer = tcpLayer; _tcpLayer.UpperLayer = this.CreateUpperLayer(tcpLayer); }
protected override IChannel CreateChannel(TcpLayer tcpLayer) { return new SimpleChannelStack(tcpLayer, this.OnRequestEnded); }
protected override void CreateChannel(TcpLayer tcpLayer) { //new SimpleChannelStack(tcpLayer); new CustomAspNetChannelStack(tcpLayer); }
public SimpleChannelStack(TcpLayer tcpLayer) { _tcpLayer = tcpLayer; SimpleChannel channel = new SimpleChannel(); channel.LowerLayer = tcpLayer; tcpLayer.UpperLayer = channel; channel.RequestEnded += new EventHandler(channel_RequestEnded); }