Created
July 23, 2022 00:33
-
-
Save zeroFruit/a4f4049d6d88ab87993bf5026f27c73f to your computer and use it in GitHub Desktop.
Channel concept & implementation— el Project (2)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static final class HeadContextHandler | |
implements ChannelOutboundHandler, ChannelInboundHandler { | |
@Override | |
public void bind( | |
ChannelHandlerContext ctx, SocketAddress localAddress, ChannelPromise promise) { | |
ctx.channel().internal().bind(localAddress, promise); | |
} | |
@Override | |
public void connect( | |
ChannelHandlerContext ctx, SocketAddress remoteAddress, ChannelPromise promise) | |
throws Exception { | |
ctx.channel().internal().connect(remoteAddress, promise); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment