作者:iloveyoumuch18 | 来源:互联网 | 2023-08-21 15:52
先启动服务端,在启动客户端。服务端接收数据,客户端发送数据。 客户端和服务端的区别:网友一(具体化):定义: 区别是两者的服务对象不同。服务器端是为客户端服
![](https://img.php1.cn/3cd4a/1eebe/cd5/7cccb7e4b6cb5cb8.webp)
![](https://img.php1.cn/3cd4a/1eebe/cd5/0ef126b5295c089b.webp)
![](https://img.php1.cn/3cd4a/1eebe/cd5/70be2ca197098d98.webp)
![](https://img.php1.cn/3cd4a/1eebe/cd5/011ac27956d007f0.webp)
![](https://img.php1.cn/3cd4a/1eebe/cd5/ddcc574beb16294e.jpeg)
![](https://img.php1.cn/3cd4a/1eebe/cd5/8343fdbffb0056b5.webp)
先启动服务端,在启动客户端。
服务端接收数据,客户端发送数据。
客户端和服务端的区别:
网友一(具体化):
定义: 区别是两者的服务对象不同。服务器端是为客户端服务的,客户端就是为真正的“客户”来服务的,所以这两者之间不同,但又密切相连,客户端是请求方或者说是指令发出方,而服务器端是响应方。
网友二(简便化):
简便说:谁来设置要实现什么功能,那就是服务端,那他设置的东西谁来用,来连接,就是客户端!很好理解吧?嘿嘿。
![](https://img.php1.cn/3cd4a/1eebe/cd5/ea91d84a82557da5.webp)
![](https://img.php1.cn/3cd4a/1eebe/cd5/d34245582687a4e6.webp)
2.多发多收
![](https://img.php1.cn/3cd4a/1eebe/cd5/21e585a7e21fc7dc.png)
![](https://img.php1.cn/3cd4a/1eebe/cd5/086aec93f5e1e9b2.webp)
![](https://img.php1.cn/3cd4a/1eebe/cd5/d67981797265d9c7.webp)
配置并发客户端
![](https://img.php1.cn/3cd4a/1eebe/cd5/6789f68dabde0aed.png)
![](https://img.php1.cn/3cd4a/1eebe/cd5/70be2ca197098d98.webp)
![](https://img.php1.cn/3cd4a/189d8/978/7dbdf0f38ad53545.jpeg)
![](https://img.php1.cn/3cd4a/1eebe/cd5/7494af3c1cda418d.webp)
多开客户端后,需要换端口号,不然会出现错误。
![](https://img.php1.cn/3cd4a/1eebe/cd5/1113165c4904ecc5.webp)
3.广播
![](https://img.php1.cn/3cd4a/1eebe/cd5/ddcc574beb16294e.jpeg)
![](https://img.php1.cn/3cd4a/1eebe/cd5/7cccb7e4b6cb5cb8.webp)
![](https://img.php1.cn/3cd4a/1eebe/cd5/b386c433a16f5497.webp)
![](https://img.php1.cn/3cd4a/1eebe/cd5/a1be7872e8d4934f.webp)
![](https://img.php1.cn/3cd4a/1eebe/cd5/5287a7b3296ea13e.webp)
![](https://img.php1.cn/3cd4a/1eebe/cd5/a1be7872e8d4934f.webp)
![](https://img.php1.cn/3cd4a/1eebe/cd5/617c1173853af4b6.webp)
![](https://img.php1.cn/3cd4a/1e618/cd5/af17da15769ccb2e.jpeg)