阅读背景:

用IP地址构造InetSocketAddress的正确方法是什么?

来源:互联网 

I want to create an InetSocketAddress but I want to do it right no matter if I get a host:port or a ip:port. I see it has two constructors, one for host (String) and another one for IP (InetAddress). Do I have to determine myself if I got an IP or HOST in order to choose between these two constructors? Am I missing something here?I want to create an InetSocketAddress but I wan




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: