@Override protected void decode(ChannelHandlerContext ctx, DatagramPacket packet, List<Object> out) throws Exception { final ByteBuf buf = packet.content(); final DnsQuery query = newQuery(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(query, buf, questionCount); decodeRecords(query, DnsSection.ANSWER, buf, answerCount); decodeRecords(query, DnsSection.AUTHORITY, buf, authorityRecordCount); decodeRecords(query, DnsSection.ADDITIONAL, buf, additionalRecordCount); out.add(query); success = true; } finally { if (!success) { query.release(); } } }
@Override protected void decode(ChannelHandlerContext ctx, DatagramPacket packet, List<Object> out) throws Exception { final ByteBuf buf = packet.content(); final DnsQuery query = newQuery(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(query, buf, questionCount); decodeRecords(query, DnsSection.ANSWER, buf, answerCount); decodeRecords(query, DnsSection.AUTHORITY, buf, authorityRecordCount); decodeRecords(query, DnsSection.ADDITIONAL, buf, additionalRecordCount); out.add(query); success = true; } finally { if (!success) { query.release(); } } }
@Override protected void decode(ChannelHandlerContext ctx, DatagramPacket packet, List<Object> out) throws Exception { final ByteBuf buf = packet.content(); final DnsQuery query = newQuery(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(query, buf, questionCount); decodeRecords(query, DnsSection.ANSWER, buf, answerCount); decodeRecords(query, DnsSection.AUTHORITY, buf, authorityRecordCount); decodeRecords(query, DnsSection.ADDITIONAL, buf, additionalRecordCount); out.add(query); success = true; } finally { if (!success) { query.release(); } } }
@Override protected void decode(ChannelHandlerContext ctx, DatagramPacket packet, List<Object> out) throws Exception { final ByteBuf buf = packet.content(); final DnsQuery query = newQuery(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(query, buf, questionCount); decodeRecords(query, DnsSection.ANSWER, buf, answerCount); decodeRecords(query, DnsSection.AUTHORITY, buf, authorityRecordCount); decodeRecords(query, DnsSection.ADDITIONAL, buf, additionalRecordCount); out.add(query); success = true; } finally { if (!success) { query.release(); } } }
@Override protected void decode(ChannelHandlerContext ctx, DatagramPacket packet, List<Object> out) throws Exception { final ByteBuf buf = packet.content(); final DnsQuery query = newQuery(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(query, buf, questionCount); decodeRecords(query, DnsSection.ANSWER, buf, answerCount); decodeRecords(query, DnsSection.AUTHORITY, buf, authorityRecordCount); decodeRecords(query, DnsSection.ADDITIONAL, buf, additionalRecordCount); out.add(query); success = true; } finally { if (!success) { query.release(); } } }