首页 新闻 会员 周边

DotNetty如何获取客户端的IP地址

0
[已关闭问题] 关闭于 2018-05-17 16:43

DotNetty如何获取客户端的IP地址

青鋒的主页 青鋒 | 初学一级 | 园豆:5
提问于:2018-05-17 15:45
< >
分享
所有回答(1)
0

IPEndPoint iPEndPoint = (IPEndPoint)context.Channel.RemoteAddress;
string ip = iPEndPoint.Address.ToString();

天不遮我 | 园豆:66 (初学一级) | 2019-04-18 17:09
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册