我用delphi编写的代码,在Event OnExecute中有一个组件Indy9 IdMappedPortTCP ...但是当我在indy 10中实现时,我遇到了一个错误
Code Event OnExecute component indy 9 IdMappedPortTCP:
procedure TForm1.IdMappedPortTCP1Execute(AThread: TIdMappedPortThread);
if (pos('CONNECT',athread.NetData)<>0) or (pos('GET',athread.NetData)<>0) or (pos('POST',athread.NetData)<>0) then
begin
Athread.NetData :=Athread.NetData+'GET http://www.rianekacahya.net/ HTTP/1.1'#13#10+'Connection: Keep-Alive'#13#10+'User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20100101 Firefox/14.0'#13#10+'Host: '#13#10#13#10#13#10+Athread.NetData;
end;event OnExecute,不是indy 9和indy 10之间的相等
Indy 9:
procedure TForm1.IdMappedPortTCP1Execute(AThread: TIdMappedPortThread);
end;Indy 10:
procedure TForm1.IdMappedPortTCP1Execute(AContext: TIdContext);
end;如何将我的代码迁移到indy 10?
发布于 2014-08-28 02:09:06
对Indy10使用TIdMappedPortTCP类(在IdMappedPortTCP.pas中)。忘了TMyMappedPortTCP吧。
;)
https://stackoverflow.com/questions/23852692
复制相似问题