Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Mar : Re: [EQ] how can i manage different connection speed ?

www.cryer.info
Managed Newsgroup Archive

Re: [EQ] how can i manage different connection speed ?

Subject:Re: [EQ] how can i manage different connection speed ?
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Thu, 6 Mar 2008 01:04:50

"Ahmadi" <ahmadisolness_b@yahoo.com> wrote in message
news:47cfa2c8@newsgroups.borland.com...

> i have a main thread that use writebuffer command to send data
> for the clients

Is there are particular reason why you are doing all of your writing in a
single thread?  That is a huge bottleneck, especially as your client count
increases.  Since TIdTCPServer is already multi-threaded to begin with, you
should consider letting those existing threads do the writing for you, on a
per-client basis.  That way, multiple clients can be written to at the same
time without blocking each other, and you don't have to worry about using
your own delays since the OS will handle all of that for you.


Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive