Non-blocking (async) DNS resolving in Java

前端 未结 6 587
一生所求
一生所求 2021-02-05 02:30

Is there a clean way to resolve a DNS query (get IP by hostname) in Java asynchronously, in non-blocking way (i.e. state machine, not 1 query = 1 thread - I\'d like to run tens

6条回答
  •  逝去的感伤
    2021-02-05 03:16

    You will, I think, have to implement the DNS client protocol yourself on top of raw UDP using base sockets support, or on top of TCP using NIO channels.

提交回复
热议问题