论文范文
《使用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传输文件”文档源于网络本人编辑整理。本着保护作者知识产权的原则仅供学习交流请勿商用。如有侵犯作者权益请作者留言或者发站内信息联系本人我将尽快删除。谢谢您的阅读与下载
春节期间我们很多朋友都在忙着吃好喝好,当然有时候也会偶然的上网看看。对于我们站长用户来说,基本上需要等到初八之后才会开工,现在有空就看看是否有商家的促销。这里看到来自HMBcloud半月湾服务商有提供两款春节机房方案的VPS主机88折促销活动,分别是来自洛杉矶CN2 GIA和日本CN2的方案。八八折优惠码:CNY-GIA第一、洛杉矶CN2 GIA美国原生IP地址、72小时退款保障、三网回程CN2 ...
A2Hosting主机,A2Hosting怎么样?A2Hosting是UK2集团下属公司,成立于2003年的老牌国外主机商,产品包括虚拟主机、VPS和独立服务器等,数据中心提供包括美国、新加坡softlayer和荷兰三个地区机房。A2Hosting在国外是一家非常大非常有名气的终合型主机商,拥有几百万的客户,非常值得信赖,国外主机论坛对它家的虚拟主机评价非常不错,当前,A2Hosting主机庆祝1...
pacificrack发布了7月最新vps优惠,新款促销便宜vps采用的是魔方管理,也就是PR-M系列。提一下有意思的是这次支持Windows server 2003、2008R2、2012R2、2016、2019、Windows 7、Windows 10,当然啦,常规Linux系统是必不可少的!1Gbps带宽、KVM虚拟、纯SSD raid10、自家QN机房洛杉矶数据中心...支持PayPal、...