论文范文
《使用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传输文件”文档源于网络本人编辑整理。本着保护作者知识产权的原则仅供学习交流请勿商用。如有侵犯作者权益请作者留言或者发站内信息联系本人我将尽快删除。谢谢您的阅读与下载
2021年恒创科技618活动香港美国服务器/云服务器/高防全场3折抢购,老客户续费送时长,每日限量秒杀。云服务器每款限量抢购,香港美国独服/高防每款限量5台/天,香港节点是CN2线路还不错。福利一:爆品秒杀 超低价秒杀,秒完即止;福利二:云服务器 火爆机型 3折疯抢;福利三:物理服务器 爆款直降 800元/月起;福利四:DDOS防护 超强防御仅 1750元/月。点击进入:2021年恒创科技618活...
近日华纳云商家正式上线了美国服务器产品,这次美国机房上线的产品包括美国云服务器、美国独立服务器、美国高防御服务器以及美国高防云服务器等产品,新产品上线华纳云推出了史上优惠力度最高的特价优惠活动,美国云服务器低至3折,1核心1G内存5Mbps带宽低至24元/月,20G ddos高防御服务器低至688元/月,年付周期再送2个月、两年送4个月、三年送6个月,终身续费同价,有需要的朋友可以关注一下。华纳云...
香港最便宜的vps要多少钱?最便宜的香港vps能用吗?香港vps无需备案,整体性能好,而且租用价格便宜,使用灵活,因为备受站长喜爱。无论是个人还是企业建站,都比较倾向于选择香港VPS。最便宜的香港vps能用吗?正因为有着诸多租用优势,香港VPS在业内颇受欢迎,租用需求量也在日益攀升。那么,对于新手用户来说,香港最便宜的vps租用有四大要点是务必要注意的,还有易探云香港vps租用最便宜的月付仅18元...