diff --git a/example/src/main/java/io/netty/example/dns/tcp/TcpDnsServer.java b/example/src/main/java/io/netty/example/dns/tcp/TcpDnsServer.java index d72070b0ba..f6eeb03a7c 100644 --- a/example/src/main/java/io/netty/example/dns/tcp/TcpDnsServer.java +++ b/example/src/main/java/io/netty/example/dns/tcp/TcpDnsServer.java @@ -67,7 +67,7 @@ public final class TcpDnsServer { ch.pipeline().addLast(new TcpDnsQueryDecoder(), new TcpDnsResponseEncoder(), new SimpleChannelInboundHandler() { @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() { @Override - protected void channelRead0(ChannelHandlerContext ctx, DefaultDnsResponse msg) { + protected void messageReceived( + ChannelHandlerContext ctx, DefaultDnsResponse msg) { try { handleQueryResp(msg); } finally {