Location:
Search - mysever
Search list
Description: 根据自定义的协议规范,使用Socket编程接口编写基本的网络应用软件。
使用操作系统提供的Socket编程接口,而不使用任何封装Socket接口的类库或组件
协议可以自己定义,只要完成指定的功能即可
程序界面不做要求,使用命令行或最简单的窗体即可
功能要求如下:
1. 运输层协议采用TCP
2. 服务端运行后,即监听指定的端口。允许多个连接并发运行
3. 服务端接收到客户端请求后,根据客户端传过来的指令完成特定任务:
a) 向客户端传送服务端所在机器的当前时间
b) 向客户端传送服务端所在机器的名称
c) 向客户端传送当前连接的所有客户端信息
d) 将某客户端发送过来的内容转发给指定编号的其他客户端
4. 客户端运行后,使别如下的人机命令,然后执行不同的任务:
a) conn <ip> <port>: 连接到指定地址和端口的服务端(代码中用的5050端口)
b) disconn:断开与服务端的连接
c) time: 请求服务端给出当前时间
d) name:请求服务端给出其机器的名称
e) list:请求服务端给出当前连接的所有客户端信息(编号、IP地址、端口等)
f) send <id>:给对应编号的其他客户端发送键盘输入的内容
g) quit:退出客户端程序
-According to the custom of the protocol specification, using Socket programming interface to prepare a basic network applications.
Use Socket programming interface provided by the operating system without the use of any package, library or component Socket Interface
protocol can define their own, as long as you can to complete the assigned functions
program interface not do requests, use the command line or the most simple form can be
In this study should form groups to complete, service and client should be done to different people
functional requirements are as follows:
1. The transport layer protocol using TCP
2. Server running, that is, the designated monitor port. Allows multiple connections to run concurrently
3. Service is received on the client requests, based on the client-side pass over the instructions to complete specific tasks:
a) transmission service to the client side where the current time machine
b) trans
Platform: |
Size: 3072 |
Author: 杨子坤 |
Hits: