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

www.cryer.info
Managed Newsgroup Archive

Re: "FReadList.SelectRead" no use ?

Subject:Re: "FReadList.SelectRead" no use ?
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Fri, 22 Sep 2006 10:20:24

"Tao Lei" <worldwidestar@sina.com.cn> wrote in message
news:4513e177@newsgroups.borland.com...

> 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?

SelectRead() waits for the socket a become signaled indicating that data has
arrived on it, before then reading it.

I assume that you are using Indy 10, is that correct?  There is no FReadList
member in TIdUDPListenerThread anymore.  In older versions of Indy,
TIdUDPServer ran a single TIdUDPListenerThread that continuously looped
through all of the available Bindings one at a time.  That meant that the
server could only process 1 packet socket a time, regardless of how many
clients were sending data.  TIdUDPServer has since been re-written awhile
ago to run multiple TIdUDPListener instances now, one for each Binding, much
like TIdTCPServer does.  This way, multiple clients can be processed
simultaneously.  You should consider upgrading.


Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive