公用IP TCP/IP聊天 [英] public IP TCP/IP chat

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

问题描述

我不了解当我的服务器位于外部IP上时如何启用聊天应用程序.我在服务器端进行了哪些更改?整个服务器端发送邮件取决于IP''除此以外,我如何解决我的问题?

I''m n''t understanding of how to make possible chat application when my server is on external IP.what all changes i hve to made at server side?The whole server side sending messages is depend upon IP''s?besides that, how cn i fix my question?

推荐答案

如果我正确理解了您的问题,则您将无法从外部网络连接到聊天服务器.也就是说,您的服务器在办公室,而您在家里尝试连接并且无法正常工作.

如果是这种情况,那么您的IP地址(服务器和客户端)都是动态的.另外,您正在尝试使用服务器的内部IP连接到服务器,该IP无法从外部访问.

因此,您需要的是服务器的静态IP或应用程序的托管域.那么只有您才能从外部网络访问服务器.您的客户端不需要任何静态IP或托管域.

现在,如果您已经在使用静态ip/托管域,那么它就无法正常工作.那么您必须打开服务器上的端口,出于安全原因,通常禁用服务器上除80以外的所有端口.请与您的主机提供商联系以打开您正在使用的特定TCP端口.

另外,我不确定,但是您可以从服务器上打开此链接 [ ^ ],它将告诉您服务器的外部IP地址.尝试在客户端应用程序上使用此地址连接到服务器.由于您的服务器具有动态IP地址,因此您在该网站上看到的地址可能每天都会更改.
If I understood your question correctly, then you are not able to connect to your chat server from outside network. i.e. your server is at your office and you are at you home trying to connect and its not working.

If this is the case then, your both the IP Address (Server and Client) are dynamic. also you are trying to connect to your server using the internal IP of the server, which is not accessible from outside.

so what you need is a static IP of your server, or a hosted domain of your application. then only you will able to access your server from outside network. your client is not required any static IP or hosted domain.

now if you are already using a static ip / hosted domain, and its not working. then you have to open the Port on the server, generally all the Ports are disabled on the server except 80 for security reasons. contact your hosting provider to open specific TCP port which you are using.

Also I am not sure but you can open this link from your server[^] and it will tell you your server''s external ip address. try using this address on your client app to connect to your server. as your server has dynamic ip address, the address you are seeing on that website might change everyday.


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

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