公共IP问题 [英] public IP problem

查看:69
本文介绍了公共IP问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生您好,
当我的服务器位于外部ip-124.30.187.135上并且我的所有办公计算机都位于不同的本地IP上时,我无法使我的TCP/IP聊天成功,但是它们都具有相同的公用ip-124.30.187.138.当用户连接到服务器时,服务器将选择所有用户的公共IP.因此,服务器连接客户端的公共IP,然后断开连接,然后连接另一个客户端.因此,聊天不是may.plz帮助我.此外,m在服务器端使用固定端口,但在客户端使用它随机选择端口

hello sir,
im n''t able to make my TCP/IP chat successful when my server is on External Ip-124.30.187.135.and all my office computers on Different local IP''s but they all have same public ip-124.30.187.138.when users connect to server,then server picks their Public Ip''s which''s same for all.becoz of this,server connects client public ip,then disonnect and then connect another client.so that,chatting is n''t possible.plz help me out.and also,m using fixed port on server side but on client side ,it picks random port

推荐答案

如果客户端位于NAT之后,那么他们将能够看到"服务器,但是服务器将无法看到"客户端.

因此,让客户端启动与服务器的连接.

尼克
If the clients are behind a NAT, then they will be able to "see" the server, but the server will not be able to "see" the clients.

So, get the clients to initiate the connection to the server.

Nick


这篇关于公共IP问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆