下载此文档

计网socket编程实验报告.doc


文档分类:通信/电子 | 页数:约5页 举报非法文档有奖
1/5
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/5 下载此文档
文档列表 文档介绍
计网socket编程实验报告.doc深圳大学实验报告
实验课程名称: 计算机网络
实验项目名称: Socket 编程
学院: 计算机与软件学院 专业: 计算机科学与技术
include<fstream>
#include<iostream>
#include<>
#include<>
#include<string>
#include""
using namespace std;
#define MENU "Welcome To The FTP Server,Please Input The Command And Enter!Such as: LIST,CWD,RETR,STOR,DELE,RMD,MKD"
;
cout<<Dir<<endl;
client->sendCommand();
client->receiveCommand();
client->receiveList();
client->receiveCommand();
}
else if(strcmp(Command,"CWD")==0||strcmp(Command,"cwd")==0)
{
memset(Dir,NULL,512);
cout<<"Plase input the dir of your will(compelete
dir)::"<<endl;
cin>>Dir;
client->setCommand("CWD ",Dir);
client->sendCommand();
client->receiveCommand();
}
else if(strcmp(Command,"retr")==0||strcmp(Command,"RETR")==0)
{
char* filename = new char[512];
memset(filename,NULL,512);
/************************************
下载模块
************************************/
client->setCommand("PASV");
client->sendCommand();
client->receiveCommand();
client->getPort();
client->setCommand("TYPE","I");
client->sendCommand();
client->receiveCommand();
client->interlizeDataSocket();
cout<<"Please input the name you want to download:";
cin>>filename;
client->setCommand("RETR ",filename);
client->sendCommand();
client->

计网socket编程实验报告 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数5
  • 收藏数0 收藏
  • 顶次数0
  • 上传人天天湖人
  • 文件大小54 KB
  • 时间2022-01-29