thank you for your continuous support.
This is a draft. I hope this will give you a correct view:
procedure TTransfer.TriggerAvail(CP: TObject; Count: Word);
if count > 0 then
for I := 1 to Count do
ReceiveBuf[MessIncr] := TApdWinsockPort(CP).GetChar;
If MessIncr = Awaited then
Allprocessed := true;
procedure MySendData(Address: Longint);
for I := 1 to 3 do
TimeOut := false;
Allprocessed := false;
MessIncr := 0;
if TimerExpired(et) then
TimeOut := true;
until AllProcessed or TimeOut;
if Allprocessed then break;
if Not timeOut then ProcessData(ReceiveBuf);
>> until Allreceived or timeout;
>> What can I do then, to get it work correctly?
> Since you have application.processmessages in your loop, the loop
> itself should not be the problem.
> Is this loop in an AsyncPro event handler or in a routine that is
> called from an AsyncPro event handler? The fact that the output is
> delayed by two seconds seems to indicate something like that might be
> the issue.