protected override void ChannelRead0(ChannelHandlerContext ctx, HttpRequest req) { uri = req.GetUri(); IO.Netty.Channel.Channel client = ctx.Channel(); IO.Netty.Bootstrap.Bootstrap proxiedServer = new IO.Netty.Bootstrap.Bootstrap().Group (client.EventLoop()).Channel(typeof(NioSocketChannel)).Handler(new _ChannelInitializer_106 (this, client)); ChannelFuture f = proxiedServer.Connect(host); proxiedChannel = f.Channel(); f.AddListener(new _ChannelFutureListener_115(this, ctx, req, client)); }
/// <exception cref="System.Exception"/> public override void ChannelActive(ChannelHandlerContext ctx) { activeChannels.AddItem(ctx.Channel()); }
public override void ExceptionCaught(ChannelHandlerContext ctx, Exception cause) { Log.Debug("Proxy for " + uri + " failed. cause: ", cause); CloseOnFlush(ctx.Channel()); }