Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Jun : handling data outside of STX-ETX
| Subject: | handling data outside of STX-ETX |
| Posted by: | "ChickenCoder" (larrykill..@gainco.com) |
| Date: | Fri, 6 Jun 2008 09:30:31 |
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;