LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 580|回复: 1

socket怎么获取客户端的IP呀

[复制链接]
发表于 2005-2-2 15:25:58 | 显示全部楼层 |阅读模式
相信有人知道,谢谢
发表于 2005-2-2 23:43:39 | 显示全部楼层
Java的api有此一说:

public InetAddress getInetAddress()

Returns the address to which the socket is connected.

Returns:
the remote IP address to which this socket is connected, or null if the socket is not connected.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表