登录
首页 » Windows Socket编程 » Client程序同样分别创建一个TCP socket 和一个UDP socket,首先client使用TCP socket连接TCP Server。 连接成...

Client程序同样分别创建一个TCP socket 和一个UDP socket,首先client使用TCP socket连接TCP Server。 连接成...

于 2023-07-31 发布 文件大小:65.12 kB
0 36
下载积分: 2 下载次数: 1

代码说明:

Client程序同样分别创建一个TCP socket 和一个UDP socket,首先client使用TCP socket连接TCP Server。 连接成功后显示提示信息; 然后client端向TCP Server发送“GET UDP PORT”字符串,Server收到后向client回送自己的UDP Server 端口号(即Client端仅知道TCP Server的端口号而不知道UDP Server的端口号); client在收到UDP Server的端口号后, 为用户显示3个选项: 1.“Get current time(TCP)”服务器时间 2.“Echo Mode(UDP)”回显6 3.“Exit the program”. -Client program also creates a TCP socket, respectively, and a UDP socket, the first client to use TCP socket connection TCP Server. After a successful connection displays a prompt message and then client-side to the TCP Server sends " GET UDP PORT" string, Server receipt back to the client to send their UDP Server port number (ie, Client-side only to know the TCP Server" s UDP port number do not know Server" s port number) client received UDP Server port number, in order to the user three options: 1. " Get current time (TCP)" server time 2. " Echo Mode (UDP)" echo 63. " Exit the program" .

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 696522资源总数
  • 104042会员总数
  • 46今日下载