Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Sep : "FReadList.SelectRead" no use ?

www.cryer.info
Managed Newsgroup Archive

"FReadList.SelectRead" no use ?

Subject:"FReadList.SelectRead" no use ?
Posted by:"Tao Lei" (worldwidest..@sina.com.cn)
Date:Fri, 22 Sep 2006 21:17:08

Hello.

I took a look at the codes of TIdUDPListenerThread.Run method.
I found the FReadList.SelectRead(AcceptWait) seems not necessary.
What is the real use of it, please?

Thank you.

////////////////////
IdUdpServer.pas
////////////////////
...
...
procedure TIdUDPListenerThread.Run;
var
  PeerIP: string;
  i, PeerPort, ByteCount: Integer;
begin

  FReadList.SelectRead(AcceptWait);  // After I delete this line, IdUdpServer also works well.

  for i := 0 to FReadList.Count - 1 do
  try
    ...
    ...
    ...
end;
...

Replies:

www.cryer.info
Managed Newsgroup Archive