Fix compile error in example introduced by bad cherry-pick of c9d6d36539

This commit is contained in:
Norman Maurer 2021-07-28 09:41:12 +02:00
parent c9d6d36539
commit 564c8c3f7c

View File

@ -67,7 +67,7 @@ public final class TcpDnsServer {
ch.pipeline().addLast(new TcpDnsQueryDecoder(), new TcpDnsResponseEncoder(),
new SimpleChannelInboundHandler<DnsQuery>() {
@Override
protected void channelRead0(ChannelHandlerContext ctx,
protected void messageReceived(ChannelHandlerContext ctx,
DnsQuery msg) throws Exception {
DnsQuestion question = msg.recordAt(DnsSection.QUESTION);
System.out.println("Query domain: " + question);
@ -122,7 +122,8 @@ public final class TcpDnsServer {
.addLast(new TcpDnsResponseDecoder())
.addLast(new SimpleChannelInboundHandler<DefaultDnsResponse>() {
@Override
protected void channelRead0(ChannelHandlerContext ctx, DefaultDnsResponse msg) {
protected void messageReceived(
ChannelHandlerContext ctx, DefaultDnsResponse msg) {
try {
handleQueryResp(msg);
} finally {