JAVA Socket获取服务端信息

1、Socket.getInetAddress(),获取服务端地址。

2、Socket.getPort(),获取服务端端口。

原文地址:https://www.cnblogs.com/qiumingcheng/p/4826138.html