Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Nov : Input Buffer empty
| Subject: | Input Buffer empty |
| Posted by: | "Larry Killen" (lkill..@charter.net) |
| Date: | Thu, 22 Nov 2007 16:37:21 |
I recently started getting occasional InputBufferIsEmpty exceptions. What
causes these and how can I test for them.
Below is the procedure I use to read the socket. I don't know how it could
be empty since it is triggered by data.
I must admit that I recently upgrade from 10.1.6 to 10.2.3. I had seen
where it was advised to upgrade to 10.2 so I did. I don't know if that
cause the exception since it only comes now and again.
procedure TReadingOutfeedThread.Execute;
begin
while not Terminated do
begin
FConn.IOHandler.WaitFor(chr(2));
FBuffer := FConn.IOHandler.ReadLn(chr(3));
ProcessData;
end;
end;
function TIdIOHandler.InputBufferIsEmpty: Boolean;
begin
Result := FInputBuffer.Size = 0;
end;