ChickenCoder
2008-06-06 13:30:31 UTC
For the last two years I have been using the following thread to receive
data. It has served me well. I am now in a situation where I have to
accept ACKs, NAKs, and EOTs. I am lost as to how to modify my code to do
this. I can't have multiple WaitFor's.
Can someone point me in the right direction?
Thanks
procedure TReadingInfinitiThread.Execute;
begin
while not Terminated do
begin
// read data
FConn.IOHandler.WaitFor(chr(2));
Buffer := FConn.IOHandler.ReadLn(chr(3));
If Not(Terminated) then
Begin
ProcessData
End;
end;
end;
data. It has served me well. I am now in a situation where I have to
accept ACKs, NAKs, and EOTs. I am lost as to how to modify my code to do
this. I can't have multiple WaitFor's.
Can someone point me in the right direction?
Thanks
procedure TReadingInfinitiThread.Execute;
begin
while not Terminated do
begin
// read data
FConn.IOHandler.WaitFor(chr(2));
Buffer := FConn.IOHandler.ReadLn(chr(3));
If Not(Terminated) then
Begin
ProcessData
End;
end;
end;