本文介绍了Java - 在没有localhost的情况下将客户端连接到服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好世界,我用服务器和运行在localhost上的客户端做了一个即时通讯工具,但是我想把客户端放在另一台计算机上,但是如果没有本地主机就无法连接到服务器,请问我能得到一些帮助(代码)我可以用来将另一台计算机上的客户端连接到我自己的计算机上的服务器而不使用本地主机。
Hello world, I made an instant messenger with the server and the client that runs on a localhost, but I want to put the client on another computer but it cannot connect to the server without the localhost, please can I get some help(codes) that i can use to connect the client on another computer to the server on my own computer without the use of a localhost.
推荐答案
使用
ipconfig
命令在Windows上(在命令行中)获取您的IP地址。
command on Windows (in command-line) to get your IP address.
这篇关于Java - 在没有localhost的情况下将客户端连接到服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!