-
-
Notifications
You must be signed in to change notification settings - Fork 15.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dns Codec updated pull request #1622
Conversation
Yes... See the release notes of 4.0.0.Final. Will check later Am 20.07.2013 um 18:59 schrieb mbakkar [email protected]:
|
We need to make sure @mbakkar signs a CLA too if that wasn't done already :) Really looking forward to getting this in by the end of the summer :) |
I believe I did sign a CLA in the beginning |
@caniszczyk let me review this and merge in at the end... |
*/ | ||
@Override | ||
public ByteBuf content() { | ||
return rawPacket.readerIndex(originalIndex); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why reset the index here ? I think this should not be done as we not do this in other ByteBufHolder impls
-DnsResponse returns content with unmodified index
@mbakkar what I would like to see is to create a new "module" called codec-dns and merge everything you have currently split into codec and handler into it. |
- Decoding and encoding methods now pass ByteBufAllocator and Charset
I have to retain it because the DnsResponse is used in the next handler in the chain (InboundDnsMessageHandler for the impl test, and for the codec test it is the "Handler" inner-class in DnsCodecTest) EDIT: some package-infos got erased, re-committing |
Callable<List<ByteBuf>> callback = new DnsCallback<List<ByteBuf>>(-1, sendQuery(DnsEntry.TYPE_A, | ||
"google.com", id, channel)); | ||
return callback.call() != null; | ||
} catch (Exception e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't swallow exceptions... Please at least log it.
- RecordDecoderFactory throws DecoderException now in constructor
@trustin please also review.. |
Doesn't it need to use its resolver in |
Not really. The resolver interface should reside at netty-transport. netty-dns should provide only the async resolver implementation. |
I guess this could clear things a lot:
i.e. io.netty.dns belongs to netty-transport. io.netty.dns.async belongs to netty-asyncdns. |
I see, and |
response.addQuestion(decodeQuestion(buf)); | ||
} | ||
if (header.getResponseCode() != 0) { | ||
System.err.println("Encountered error decoding DNS response for domain \"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should just use "return response" here.
I see that DnsResource provides access to the TTL value, but the decoders in io.netty.dns.decoder do not expose the TTL. For some kinds of DNS clients, we might need the TTL, to provide a secondary caching layer (e.g., Sender Policy Framework). If this is an uncommon need, then one could extend all of the decoders for their particular use-case, but if clients will often need to know the TTL, then perhaps it should be copied from DnsResource within the decode-function and exposed by the decoders. |
@mbakkar how are things going with this project? |
Hi just a brief update.. I haven't really made progress on this in the past 2 weeks. I know clearly what I need to do but I've been stretched for time since I started school. I finish handing in a couple major assignments tomorrow at 11:59 PM, and then I should have a few days leeway where I can continue working on this after that. Sorry for getting back so late..! |
@mbakkar, no worries! You've done a great job so far. Please take your time. @caniszczyk, sure. I'll review it and merge it into master once it's ready. :-) |
@mbakkar @caniszczyk @trustin working on clean this up now and merge to master.. stay tuned. |
I merged everything into dns branch.. Let me polish the code there. So closing this now.. @mbakkar thanks again for all your work |
This PR also includes a AsynchronousDnsResolver which allows to resolve DNS entries in a non blocking way by make use of the dns codec and netty transport itself.
This PR also includes a AsynchronousDnsResolver which allows to resolve DNS entries in a non blocking way by make use of the dns codec and netty transport itself.
Motivation: As part of GSOC 2013 we had @mbakkar working on a DNS codec but did not integrate it yet as it needs some cleanup. This commit is based on @mbakkar's work and provide the codec for DNS. Modifications: Add DNS codec Result: Reusable DNS codec will be included in netty. This PR also includes a AsynchronousDnsResolver which allows to resolve DNS entries in a non blocking way by make use of the dns codec and netty transport itself.
Motivation: As part of GSOC 2013 we had @mbakkar working on a DNS codec but did not integrate it yet as it needs some cleanup. This commit is based on @mbakkar's work and provide the codec for DNS. Modifications: Add DNS codec Result: Reusable DNS codec will be included in netty. This PR also includes a AsynchronousDnsResolver which allows to resolve DNS entries in a non blocking way by make use of the dns codec and netty transport itself.
Motivation: As part of GSOC 2013 we had @mbakkar working on a DNS codec but did not integrate it yet as it needs some cleanup. This commit is based on @mbakkar's work and provide the codec for DNS. Modifications: Add DNS codec Result: Reusable DNS codec will be included in netty. This PR also includes a AsynchronousDnsResolver which allows to resolve DNS entries in a non blocking way by make use of the dns codec and netty transport itself.
I had already closed the other pull request and deleted the repository. I don't think I can reopen pull requests. But here is an updated one (with some changes to work with 4.0.2).
I noticed when writing to a channel information isn't flushed automatically, I have to use writeAndFlush(). Intentional?