Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Dec : Re: Multythreading TIdTcpClient on workstation OS
| Subject: | Re: Multythreading TIdTcpClient on workstation OS |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Fri, 29 Dec 2006 20:33:53 |
"Dejan Petrovic" <dejanbng@removeThis.ztbclan.com> wrote in message
news:4595cde3@newsgroups.borland.com...
> wondering what indy and XP Home edition will do when I trying
> to open let's say 1000 connections in time :
If you exceed the OS's limits, you will get exceptions raised by Indy
when sockets cannot be created/opened anymore.
> 1. Open first 40 connections and raise error on all other threads
which try
> to open more connections ?
Yes.
> 2. windows internaly put on wait rest 960 connections till first one
is
> closed and process one by one ?
No.
> 3. allow all 1000 to send ?
Very doubtful.
> Actually I don't know do I shall :
A pool sounds like a good idea. That way, you are limited to what is
actually available, and your code can throttle itself according to
availability.
> sending pseudo code is simple and shall be fast :
You may also consider using UDP instead of TCP, since there are no
connections in UDP.
Gambit