论文范文
《使用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传输文件”文档源于网络本人编辑整理。本着保护作者知识产权的原则仅供学习交流请勿商用。如有侵犯作者权益请作者留言或者发站内信息联系本人我将尽快删除。谢谢您的阅读与下载
IMIDC是一家香港本土运营商,商家名为彩虹数据(Rainbow Cloud),全线产品自营,自有IP网络资源等,提供的产品包括VPS主机、独立服务器、站群独立服务器等,数据中心区域包括香港、日本、台湾、美国和南非等地机房,CN2网络直连到中国大陆。目前主机商针对日本独立服务器做促销活动,而且提供/28 IPv4,国内直连带宽优惠后每月仅88美元起。JP Multiple IP Customize...
近日CloudCone发布了最新的补货消息,针对此前新年闪购年付便宜VPS云服务器计划方案进行了少量补货,KVM虚拟架构,美国洛杉矶CN2 GT线路,1Gbps带宽,最低3TB流量,仅需14美元/年,有需要国外便宜美国洛杉矶VPS云服务器的朋友可以尝试一下。CloudCone怎么样?CloudCone服务器好不好?CloudCone值不值得购买?CloudCone是一家成立于2017年的美国服务器...
速云怎么样?速云是一家国人商家。速云商家主要提供广州移动、深圳移动、广州茂名联通、香港HKT等VDS和独立服务器。目前,速云推出深圳独服优惠活动,机房为深圳移动机房,购买深圳服务器可享受5折优惠,目前独立服务器还支持申请免费试用,需要提交工单开通免费体验试用,次月可享受永久8折优惠,也是需工单申请哦!点击进入:速云官方网站地址活动期限至 2021年7月22日速云云服务器优惠活动:活动1:新购首月可...