![]() |
mit EINEM idtcpserver sowohl strs als auch streams empfangen
hallo!
ich muss mit einem(!) idtcpserver sowohl strings als auch streams empfangen können ich arbeite mit indy9. hab schon viele sachen probiert aber nichts hat geklappt, derzeit kann cih nur strings empfangen:
Delphi-Quellcode:
wenn ich folgendes mache, geht garnichts mehr:
procedure TForm1.serverExecute(AThread: TIdPeerThread);
var text:string; len:integer; begin text:=athread.Connection.ReadLn; if (text<>'') then //irgendwas len:=athread.Connection.ReadInteger; if (len<>0) then //was anderes end;
Delphi-Quellcode:
es treten keine(!) fehler auf!
procedure TForm1.serverExecute(AThread: TIdPeerThread);
var text:string; len:integer; begin text:=athread.Connection.ReadLn; len:=athread.Connection.ReadInteger; if (text<>'') then //irgendwas if (len<>0) then //was anderes end; es wird halt nur nicht das ereignis ausgeführt, das beim empfang von strings/streams ausgeführt werden soll. habt ihr ne ahnung wie ich abfragen kann, ob grad ein stream oder ein string kommt? danke! |
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:16 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz