@Override protected void decode(ChannelHandlerContext ctx, DatagramPacket packet, List<Object> out) throws Exception { final ByteBuf buf = packet.content(); final DnsResponse response = newResponse(packet, buf); boolean success = false; try { final int questionCount = buf.readUnsignedShort(); final int answerCount = buf.readUnsignedShort(); final int authorityRecordCount = buf.readUnsignedShort(); final int additionalRecordCount = buf.readUnsignedShort(); decodeQuestions(response, buf, questionCount); decodeRecords(response, DnsSection.ANSWER, buf, answerCount); decodeRecords(response, DnsSection.AUTHORITY, buf, authorityRecordCount); decodeRecords(response, DnsSection.ADDITIONAL, buf, additionalRecordCount); out.add(response); success = true; } finally { if (!success) { response.release(); } } }
if (content != null) { content.release();
@Override protected void decode(ChannelHandlerContext ctx, DatagramPacket packet, List<Object> out) throws Exception { final ByteBuf buf = packet.content(); final DnsResponse response = newResponse(packet, buf); boolean success = false; try { final int questionCount = buf.readUnsignedShort(); final int answerCount = buf.readUnsignedShort(); final int authorityRecordCount = buf.readUnsignedShort(); final int additionalRecordCount = buf.readUnsignedShort(); decodeQuestions(response, buf, questionCount); decodeRecords(response, DnsSection.ANSWER, buf, answerCount); decodeRecords(response, DnsSection.AUTHORITY, buf, authorityRecordCount); decodeRecords(response, DnsSection.ADDITIONAL, buf, additionalRecordCount); out.add(response); success = true; } finally { if (!success) { response.release(); } } }
if (content != null) { content.release();
if (content != null) { content.release();
@Override protected void decode(ChannelHandlerContext ctx, DatagramPacket packet, List<Object> out) throws Exception { final ByteBuf buf = packet.content(); final DnsResponse response = newResponse(packet, buf); boolean success = false; try { final int questionCount = buf.readUnsignedShort(); final int answerCount = buf.readUnsignedShort(); final int authorityRecordCount = buf.readUnsignedShort(); final int additionalRecordCount = buf.readUnsignedShort(); decodeQuestions(response, buf, questionCount); decodeRecords(response, DnsSection.ANSWER, buf, answerCount); decodeRecords(response, DnsSection.AUTHORITY, buf, authorityRecordCount); decodeRecords(response, DnsSection.ADDITIONAL, buf, additionalRecordCount); out.add(response); success = true; } finally { if (!success) { response.release(); } } }
@Override protected void decode(ChannelHandlerContext ctx, DatagramPacket packet, List<Object> out) throws Exception { final ByteBuf buf = packet.content(); final DnsResponse response = newResponse(packet, buf); boolean success = false; try { final int questionCount = buf.readUnsignedShort(); final int answerCount = buf.readUnsignedShort(); final int authorityRecordCount = buf.readUnsignedShort(); final int additionalRecordCount = buf.readUnsignedShort(); decodeQuestions(response, buf, questionCount); decodeRecords(response, DnsSection.ANSWER, buf, answerCount); decodeRecords(response, DnsSection.AUTHORITY, buf, authorityRecordCount); decodeRecords(response, DnsSection.ADDITIONAL, buf, additionalRecordCount); out.add(response); success = true; } finally { if (!success) { response.release(); } } }
@Override protected void decode(ChannelHandlerContext ctx, DatagramPacket packet, List<Object> out) throws Exception { final ByteBuf buf = packet.content(); final DnsResponse response = newResponse(packet, buf); boolean success = false; try { final int questionCount = buf.readUnsignedShort(); final int answerCount = buf.readUnsignedShort(); final int authorityRecordCount = buf.readUnsignedShort(); final int additionalRecordCount = buf.readUnsignedShort(); decodeQuestions(response, buf, questionCount); decodeRecords(response, DnsSection.ANSWER, buf, answerCount); decodeRecords(response, DnsSection.AUTHORITY, buf, authorityRecordCount); decodeRecords(response, DnsSection.ADDITIONAL, buf, additionalRecordCount); out.add(response); success = true; } finally { if (!success) { response.release(); } } }
if (content != null) { content.release();