论文范文
《使用indy的
IdTcpServer,IdTcpclient传输文件》Word格式可编辑可修改
精心整理放心阅读欢迎下载
文档信息
使用indy的IdTcpS erver,IdTcpclient传输文
件
接受部分有个用户和密码check你取消就可以 procedure TTCP_(AThread: TIdPeerThread) ;var FStream : TFi leStream;FileName : String; CmdStr : String;begin CmdStr :=() ;if CompareStr(Copy(CmdStr 1 6) ' ' )=0 then begin 1Delete(CmdStr 1 6) ; Cmd := '上传文件' ;
FileName := CmdStr; if
FileExists(ExtractFilePath()+FileName) then
DeleteFile(ExtractFilePath()+FileName) ; try
FStream := (ExtractFilePath()+FileName FmCreate) ;
(FStream 2048 true) ; Finally ; ;end; end 1 else if CompareStr(Copy(CmdStr 1 6) ' ' )=0 then begin 2 Delete(CmdStr 1 6) ;
Cmd := '文件' ; Fi l eName := CmdStr; if
FileExists(ExtractFilePath()+FileName) then begin try FStream := (ExtractFilePath()+FileNameFmOpenRead) ; (FStream True False) ;
Finally ; ; end;end else begin
('Failed' ) ; ; end; end 2 else if CompareStr(Copy(CmdStr 1 6) ' ' )=0 then begin 3
Delete(CmdStr 1 6) ; User :=
UpperCase(Trim(DecryptString(CmdStr 20504))) ; CmdStr;if CompareStr(User 'XDM' )=0 then begin
('User: '+User) ; CmdStr :=' ' ; end else begin ('User: '+User+' 非法登
陆 已关闭连接' ) ; CmdStr := ' ' ;
(' ' ) ; ; end; end 3 else if CompareStr(Copy(CmdStr 1 6) ' ' )=0 then begin 4
[1] [2]下一页
Delete(CmdStr 1 6) ; Password :=
DecryptString(CmdStr 20504) ; CmdStr; if
CompareStr(Password ' 123abc' )=0 then begin
('Login. . . . . . . . . .Accepted' ) ;
('Connected. . . . . . '+DateTimeToStr(Now)) ; CmdStr :=' ' ; (' ' ) ; end else begin ('Password Wrong. . .Login Failure' ) ;
(' ' ) ; CmdStr :=' ' ; ; end;end; 4end;主要发送部分procedure TTCP_(Sender: TObject) ;var FStream : TFileStream;begin if then begin
(' '+ExtractFi leName(Fi leName)) ; if FileName = ' ' then MessageBox(Handle '没有选择文件' 'Error' MB_OK) el se begin try FStream := (FileName
FmOpenRead) ; := 0; (0 0) ;
(FStream true false) ;
Finally ; ; end;
('Traferred OK' ) ; end; end else begin
MessageBox(Handl e '没有连接服务器' 'Error' MB_Ok) ;end;end;
上一页[1] [2]
“使用indy的IdTcpServer,IdTcpcli en t传输文件”文档源于网络本人编辑整理。本着保护作者知识产权的原则仅供学习交流请勿商用。如有侵犯作者权益请作者留言或者发站内信息联系本人我将尽快删除。谢谢您的阅读与下载
RAKsmart商家一直以来在独立服务器、站群服务器和G口和10G口大端口流量服务器上下功夫比较大,但是在VPS主机业务上仅仅是顺带,尤其是我们看到大部分主流商家都做云服务器,而RAKsmart商家终于开始做云服务器,这次试探性的新增美国硅谷机房一个方案。月付7.59美元起,支持自定义配置,KVM虚拟化,美国硅谷机房,VPC网络/经典网络,大陆优化/精品网线路,支持Linux或者Windows操作...
greencloudvps怎么样?greencloudvps是一家国外主机商,VPS数据中心多,之前已经介绍过多次了。现在有几款10Gbps带宽的特价KVM VPS,Ryzen 3950x处理器,NVMe硬盘,性价比高。支持Paypal、支付宝、微信付款。GreenCloudVPS:新加坡/美国/荷兰vps,1核@Ryzen 3950x/1GB内存/30GB NVMe空间/1TB流量/10Gbps...
CUBECLOUD(魔方云)成立于2016年,亚太互联网络信息中心(APNIC)会员,全线产品均为完全自营,专业数据灾备冗余,全部产品均为SSD阵列,精品网络CN2(GIA) CU(10099VIP)接入,与当今主流云计算解决方案保持同步,为企业以及开发者用户实现灵活弹性自动化的基础设施。【夏日特促】全场产品88折优惠码:Summer_2021时间:2021年8月1日 — 2021年8月8日香港C...