论文范文
《使用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传输文件”文档源于网络本人编辑整理。本着保护作者知识产权的原则仅供学习交流请勿商用。如有侵犯作者权益请作者留言或者发站内信息联系本人我将尽快删除。谢谢您的阅读与下载
TMThosting发布了一个2021 Summer Sale活动,针对西雅图VPS主机提供月付7折优惠码,年付65折优惠码,独立服务器提供95折优惠码,本轮促销活动到7月25日。这是一家成立于2018年的国外主机商,主要提供VPS和独立服务器租用业务,数据中心包括美国西雅图和达拉斯,其中VPS基于KVM架构,都有提供免费的DDoS保护,支持选择Windows或者Linux操作系统。Budget ...
819云互联是海外领先的互联网业务平台服务提供商。专注为用户提供低价高性能云计算产品,致力于云计算应用的易用性开发,并引导云计算在国内普及。目前平台研发以及运营云服务基础设施服务平台(IaaS),面向全球客户提供基于云计算的IT解决方案与客户服务,拥有丰富的海外资源、香港,日本,美国等各国优质的IDC资源。官方网站:https://www.819yun.com香港特价物理服务器:地区CPU内存带宽...
在2014年发现原来使用VPS的客户需求慢慢的在改版,VPS已经不能满足客户的需求。我们开始代理机房的独立服务器,主推和HS机房的独立服务器。经过一年多的发展,我们发现代理的服务器配置参差不齐,机房的售后服务也无法完全跟上,导致了很多问题发生,对使用体验带来了很多的不便,很多客户离开了我们。经过我们慎重的考虑和客户的建议。我们在2015开始了重大的改变, 2015年,我们开始计划托管自己...