数据同步传输系统既适合于服务器端的目录遍历,又适合客户端对服务端的上传文件和下载文件。文中介绍了怎样运用Socket(套接字)接口和使用FTP(文件传输协议)来实现客户端和服务器端之间信息的交互。该数据传输平台分为两个模块:服务器端模块和客户端模块。客户服务器程序通过对编程语言 Visual C++6.0中的调用来实现利用TCP/IP协议中的 FTP协议和封装在NMFTP 内的Socket 接口进行客户端与服务器连接,并完成数据同步工作,例如:上传、下载、 浏览、查询、 对服务器目录与文件的管理以及执行远程命令等。 服务器端程序则持续的监听网络。当接受到客户端的Socket ,服务器程序提供相应的服务。网络通信模块使用POP3 控件来实现客户端与服务器的信息交流。 关键字 :局域网,Socket,FTP, 网络上的通信。 Abstrac This data delivers the platform since suitable for service catalogue time that carry ,is again suitable for customer to carry to carry of download。 Introduced to how pass to make use of the Socket to connect in the text is with that use the FTP technique to realize the customer to carry with service carry the hand covering of information is with each other。 That data delivers the platform to be divided into two pieces model: The Server 、Communication on the network and The Client. The program of the client uses NMFTP API in the programming language C++ 6.0,as can link service of the server with FTP, which is one part of TCP/IP protocol , and Socket interface supplied by NMFTP component .It can complete the data transferring. Synchronously For example : the files’downloading and uploading, seeking, Query, the management for dictionary and file in the remote server ,execute FTP command in the remote one. The program of the server goes on listening the Network When receiving a Socket of the client, this program may provide server as the same what the client required. The model of communication in the Intranet can success the information’s exchangebetween the server with POP3 component. Key word: the Intranet、the Socket、FTP、Communication in the Intranet。 |