网络客户端服务器 [英] network client server

查看:77
本文介绍了网络客户端服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在不同的机器上运行TCP客户端和服务器。 (一个machene上的客户端和第二台机器上的服务器)?

我编写了程序,其中..我提到了ip地址作为localhost和硬编码端口号...所以它工作正常机器。

How I can run TCP client and server on diffrent machine. (client on one machene and server on second machine)?
I have written program in which ..I have mention ip address as localhost and hard coded port number...so it is working fine on same machine.

推荐答案

嗯,客户端必须知道端口号,因此您可以对其进行硬编码。

在客户端指定正确的服务器IP地址。这就是全部。
Well ,the port number must be known by the client, hence you can keep it hard-coded.
On the client side specify the right server IP address. That''s all.


这篇关于网络客户端服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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