Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Dec : Multythreading TIdTcpClient on workstation OS
| Subject: | Multythreading TIdTcpClient on workstation OS |
| Posted by: | "Dejan Petrovic" (dejanbng@removethis.ztbclan.com) |
| Date: | Fri, 29 Dec 2006 23:25:06 |
As I explained in another post here I need to send from one client to many
servers in time 300, 500 or even 1000 small messages. Because this
application may be runing on any windows OS and because workstation OS have
limited number of opened connections in time (also, this is hard to test and
to be sure) wondering what indy and XP Home edition will do when I trying to
open let's say 1000 connections in time :
1. Open first 40 connections and raise error on all other threads which try
to open more connections ?
2. windows internaly put on wait rest 960 connections till first one is
closed and process one by one ?
3. allow all 1000 to send ?
4 ...
Actually I don't know do I shall :
a) just create threads for all connections and let TIdTcpClient to send all
messages or to send errors back to error queue
or
b) to made limited pull of TIdTcpClients (how big pool ?) and let those
threads to get items from sending queue.
sending pseudo code is simple and shall be fast :
Connect
Send
Disconnect