您现在的位置:网站首页答辩论文计算机毕业设计计算机论文计算机通信论文

[文件传输] 文件传输(基于TPC/IP,JAVA开发)

  • 简介:-Program Specification This program is based on Client/Server architecture, used to transfer a file from server to client. With TCP socket programming, the client sends messages to server, specifying the file name. The server looks up...
    • 请与管理员联系购买资料 QQ:5739126
  • 论文简介
  • 相关论文
  • 论文下载
目录 PART I Program Introduction…………………………………..3-7
Program Specification……………………………………………….3
Experimental Goal…………………………………………………..3
Principle……………………………………………………………3-4
Strategy……………………………………………………………….4
Result……………………………………………………………….5-7
PART II Code List………………………………………………..7-11
Client Code
Server Code
PART III Reference
Some Books
Some People 参考资料
Douglas E. Comer
Mike Loukides
-Program Specification
This program is based on Client/Server architecture, used to transfer a file from server to client. With TCP socket programming, the client sends messages to server, specifying the file name. The server looks up the current directory with the same file name. If found, then sends them to the client, and the client saves them in the current directory with the same file name. If not found, the server sends a message containing information “File not found!” to the client.
-Experimental Goal
The goal of this program is to transfer file. Client can transfer file from server one by one until it stops inputting.
-Principle
First server and client make the same port that is used to transfer files. Then give the IP address to client. Then TCP protocol has been built up. First, start server, and then start client. Client input a file name and put it into an output stream. Send this output stream to server. Server reads message and judge if the file exists. If not, send an output stream including message that “File not found!” . If found, then get the length of the file. Send 1024 bytes once in a stream to client until all file transferred. Client received the file and saved them in the current directory.
查看评论 已有0位网友发表了看法
  • 验证码: