Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Dec : Re: Multythreading TIdTcpClient on workstation OS

www.cryer.info
Managed Newsgroup Archive

Re: Multythreading TIdTcpClient on workstation OS

Subject:Re: Multythreading TIdTcpClient on workstation OS
Posted by:"Dejan Petrovic" (dejanbng@removethis.ztbclan.com)
Date:Sat, 30 Dec 2006 02:40:25

tnx for fast answer :

UDP is considerated but only for some type of messages, there are system
messages and chat messages, I can allow to lose some chat messages but lose
of system message would be ugly bug.

I just did test with 3000 messages and opening up to 3000 threads (LOL, just
test). Task manager show up to 580 threads in moments, because sending
threads sending back if fail all messages were sent but performances were
ugly.

Anyway, this is extreme test, normal situation would be to send 200-300 msg
in time.

one detail :
of code throttle itself according to availability I can block other runing
programs, not really good idea.

I Will made some more tests, including UDP.

tnx again
Dejan


"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
news:4595edad$1@newsgroups.borland.com...
>
> "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

Replies:

none

In response to:

www.cryer.info
Managed Newsgroup Archive