简体   繁体   English

客户端服务器Java应用

[英]Client Server Java app

I developed a client server based java networking Instant Messaging app. 我开发了一个基于客户端服务器的Java网络即时消息应用程序。 The client program is needed to be run on the client computer whereas the server program is on server computer. 客户端程序需要在客户端计算机上运行,​​而服务器程序则在服务器计算机上运行。 This works in my local wi-fi network(Home network). 这可以在我的本地wi-fi网络(家庭网络)中使用。 But i want this one to deploy on internet using some servers and so,so that my friend who is in another city can run the client program from there. 但是我希望此服务器可以使用某些服务器部署在Internet上,以便我在另一个城市的朋友可以从那里运行客户端程序。 Would it be possible for me to do this? 我可以这样做吗? I tried to learn heroku techniques for java but its hard for me to understand. 我试图学习java的heroku技术,但是很难理解。

i want this one to deploy on internet using some servers and so,so that my friend who is in another city can run the client program from there 我希望此服务器可以使用某些服务器部署在Internet上,以便我在另一个城市的朋友可以从那里运行客户端程序

You can ! 您可以 !

I have two ways: 我有两种方法:

  • 1: You register static ip, so you can configure you client and server program to connect each other. 1:您注册了静态ip,因此可以将客户端程序和服务器程序配置为相互连接。

  • 2: Client get current public ip of server(by using some free services: email, instant messessing,..), server will auto get current public ip and auto update it's ip(by using some free services), client auto update public ip of server. 2:客户端获取服务器的当前公共IP(通过使用一些免费服务:电子邮件,即时通讯等),服务器将自动获取当前公共IP并自动更新其IP(通过使用一些免费服务),客户端自动更新公共IP服务器。 You can get current public ip of server by whatismyip 您可以通过whatismyip获取服务器的当前公共IP。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM