Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Jul : Re: Server process communicating with multiple PC's

www.cryer.info
Managed Newsgroup Archive

Re: Server process communicating with multiple PC's

Subject:Re: Server process communicating with multiple PC's
Posted by:"D-Fan" (d-fan@antispam.com)
Date:Mon, 4 Aug 2008 02:18:23

Craig Hammon wrote:
> If you are using a thread, dont use a timer. Use a sleep..
>
> But my point was, ether side of the conversation can act as the listening
> side.. If deach client was a listening, you wouldnt need multi threads.
>
>
> "D-Fan" <D-Fan@antispam.com> wrote in message
> news:48934783$1@newsgroups.borland.com...
>> The clients will check their local ports via a timer and a thread
>> process.  They will not request from the server unless they find a flag
>> in their receive port which tells them to go to the server.  The goal is
>> to reduce unnecessary network traffic and database query processes.
>>
>> Craig Hammon wrote:
>>> You could make hundreds of threads..
>>> If the Hub or server is making contact with the Client,
>>>
>>> Then why not make the clients listen for a contact..
>>> So, the client has a listening port.. and becomes a server itself.
>>>
>>> the Hub makes contact with the workstation, and in this case, acts as a
>>> client, since its initiating contact
>>> if you do it this way, you only need one thread  on the listening server
> on
>>> each workstation.
>>> hope that makes sense..
>>>
>>>
>>> "D-Fan" <D-Fan@antispam.com> wrote in message
>>> news:4892107c$1@newsgroups.borland.com...
>>>> I am writing a server process that will communicate with multiple pc's
>>>> on an as needed basis.  I might have 200 - 300 PC's connected at the
>>>> same time.  If I see a certain flag set I want to be able to send the
>>>> user a message.  Is it best to have a thread per user to handle this
>>>> message communication or is a thread pool better at handling this?
>>>>
>>>> If I use a thread pool how can I manage it so that different threads
>>>> look at different client connections?
>>>
>
>
How do you make a thread sleep? I have seen suspend, but not sleep.  Is
this a case where you would enter a repeat loop in the read  with a
sleep call inside the loop?

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive