文件名称:tcpip1
- 所属分类:
- 通讯编程
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2016-11-24
- 文件大小:
- 7.75mb
- 下载次数:
- 0次
- 提 供 者:
- 王*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
简单的客户/服务器程序实现客户系统时间和服务器系统时间同步。
具体:
客户:(1)客户创建流套接字,向服务器发起TCP连接。
(2)连接创建成功后,接收服务器返回的时间,更新客户系统时间。
(3)断开与服务器的连接。
服务器:(1)服务器创建监听套接字,监听客户TCP连接请求。
(2)当收到一个客户TCP连接请求,创建连接套接字同意与其创建连接。
(3)获取系统时间,通过连接套接字返回给客户。-Simple client/server program to achieve customer system time and server system time synchronization.
Specific:
Customer: (1) the client creates a stream socket and initiates an TCP connection to the server.
(2) after the connection is created, the server returns the time and updates the customer system time.
(3) disconnect the server.
Server: (1) server to create a listening socket, monitor client TCP connection request.
(2) when a client TCP connection request is received, the connection socket is created to agree to the creation of the connection.
(3) to obtain the system time, through the connection socket to return to the customer.
具体:
客户:(1)客户创建流套接字,向服务器发起TCP连接。
(2)连接创建成功后,接收服务器返回的时间,更新客户系统时间。
(3)断开与服务器的连接。
服务器:(1)服务器创建监听套接字,监听客户TCP连接请求。
(2)当收到一个客户TCP连接请求,创建连接套接字同意与其创建连接。
(3)获取系统时间,通过连接套接字返回给客户。-Simple client/server program to achieve customer system time and server system time synchronization.
Specific:
Customer: (1) the client creates a stream socket and initiates an TCP connection to the server.
(2) after the connection is created, the server returns the time and updates the customer system time.
(3) disconnect the server.
Server: (1) server to create a listening socket, monitor client TCP connection request.
(2) when a client TCP connection request is received, the connection socket is created to agree to the creation of the connection.
(3) to obtain the system time, through the connection socket to return to the customer.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
实验1
.....\TCP
.....\...\Server
.....\...\......\._Server.cpp
.....\...\......\Debug
.....\...\......\.....\Server.exe
.....\...\......\.....\Server.ilk
.....\...\......\.....\Server.obj
.....\...\......\.....\Server.pch
.....\...\......\.....\Server.pdb
.....\...\......\.....\StdAfx.obj
.....\...\......\.....\client.obj
.....\...\......\.....\vc60.idb
.....\...\......\.....\vc60.pdb
.....\...\......\ReadMe.txt
.....\...\......\Server.cpp
.....\...\......\Server.dsp
.....\...\......\Server.dsw
.....\...\......\Server.ncb
.....\...\......\Server.opt
.....\...\......\Server.plg
.....\...\......\StdAfx.cpp
.....\...\......\StdAfx.h
.....\...\client
.....\...\......\._client.cpp
.....\...\......\Debug
.....\...\......\.....\client.exe
.....\...\......\.....\client.ilk
.....\...\......\.....\client.obj
.....\...\......\.....\client.pch
.....\...\......\.....\client.pdb
.....\...\......\.....\vc60.idb
.....\...\......\.....\vc60.pdb
.....\...\......\ReadMe.txt
.....\...\......\StdAfx.cpp
.....\...\......\StdAfx.h
.....\...\......\client.cpp
.....\...\......\client.dsp
.....\...\......\client.dsw
.....\...\......\client.ncb
.....\...\......\client.opt
.....\...\......\client.plg
.....\UDP
.....\...\Server
.....\...\......\._Server.cpp
.....\...\......\Debug
.....\...\......\.....\Server.exe
.....\...\......\.....\Server.ilk
.....\...\......\.....\Server.obj
.....\...\......\.....\Server.pch
.....\...\......\.....\Server.pdb
.....\...\......\.....\StdAfx.obj
.....\...\......\.....\client.obj
.....\...\......\.....\vc60.idb
.....\...\......\.....\vc60.pdb
.....\...\......\ReadMe.txt
.....\...\......\Server.cpp
.....\...\......\Server.dsp
.....\...\......\Server.dsw
.....\...\......\Server.ncb
.....\...\......\Server.opt
.....\...\......\Server.plg
.....\...\......\StdAfx.cpp
.....\...\......\StdAfx.h
.....\...\client
.....\...\......\._client.cpp
.....\...\......\Debug
.....\...\......\.....\Server.obj
.....\...\......\.....\client.exe
.....\...\......\.....\client.ilk
.....\...\......\.....\client.obj
.....\...\......\.....\client.pch
.....\...\......\.....\client.pdb
.....\...\......\.....\vc60.idb
.....\...\......\.....\vc60.pdb
.....\...\......\ReadMe.txt
.....\...\......\StdAfx.cpp
.....\...\......\StdAfx.h
.....\...\......\client.cpp
.....\...\......\client.dsp
.....\...\......\client.dsw
.....\...\......\client.ncb
.....\...\......\client.opt
.....\...\......\client.plg