文件名称:lab4
- 所属分类:
- Internet/网络编程
- 资源属性:
- [PPT]
- 上传时间:
- 2012-11-26
- 文件大小:
- 65kb
- 下载次数:
- 0次
- 提 供 者:
- ivyn*****
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
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" .
连接成功后显示提示信息;
然后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" .
(系统自动生成,下载前可以参看下载内容)
下载文件列表
lab4\lab4基于C_S结构的Socket程序设计.doc
....\lab4.ppt
lab4
....\lab4.ppt
lab4