Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 May : Re: Indy UDP readevent doesn't use dual core/multi processors?
| Subject: | Re: Indy UDP readevent doesn't use dual core/multi processors? |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Mon, 1 May 2006 14:17:49 |
"Mike" <johnson40@zonnet.nl> wrote in message
news:44565c37$1@newsgroups.borland.com...
> I wrote an example application with an UDP server and an UDP client.
Which version of Indy are you using?
> the event itself is in a thread (it is just one thread since UDP is
connectionless).
You must be using an older version then. In the current Indy 10 shapshot,
TIdUDPServer uses a separate thread for each individual Binding, much like
TIdTCPServer does. This allows multiple Bindings to receive data
simultaneously now. Older versions used a single thread to manage all
Bindings in a serialized manner.
> Possible solutions I tried:
C) update to the latest Indy 10 snapshot, and use multiple Bindings for the
server
> A) Two udpservers, this works fine and both CPU's are used, but this
> is obviously only possible if the listen to different ports, I would
really
> like all the client to send to the same port.
There is no way to receive data from multiple clients on the same port at
the same time simultaneously. Particularly because on the server side, you
only have 1 socket endpoint to work with per port. When you read on that
endpoint, it will tell you which client endpoint the received data block
came from. The server endpoint can't receive data from two separate client
endpoints at the same time. You would have to use multiple ports for that.
Gambit