Socket常用有惨构造方法有如下: Socket(InetAddress address, int port) Socket(InetAddress address, int port, InetAddress localAddr, int localPort) Socket(String host, int port) Socket(String host, int port, InetAddress localAddr, int localPort) 其中InetAddress的获取方式如…