开发者

InetSocketAddress constructor performs reverse dns

开发者 https://www.devze.com 2023-02-08 12:16 出处:网络
I\'ve just found out, because of a stack trace reported by a \'hang\' in our fing android application:

I've just found out, because of a stack trace reported by a 'hang' in our fing android application:

constructor InetSocketAddress(InetAddress开发者_如何学编程 address, int port) creates a socket address with an address and the port, but it seems that it also tries to do reverse dns lookup for that provided address, in order to get the hostname.

This is not desired at all, since not only it's not used by our code, but moreover it slows down the application, as our app creates a relevant number of InetSocketAddress but always with a yet resolved/translated inet address.

Do you know if there is a way to get rid of this undesired reverse dns lookup?

0

精彩评论

暂无评论...
验证码 换一张
取 消