From: crouzilles on
Hello,

I would like to know if a Tcl server created with the socket command
can handle multiple clients (1000s) or does one need to use threads
for this?

Thank you
From: Jeff Godfrey on
crouzilles wrote:
> Hello,
>
> I would like to know if a Tcl server created with the socket command
> can handle multiple clients (1000s) or does one need to use threads
> for this?
>
> Thank you

It'll definitely handle multiple (many) clients, though I don't know
whether thousands is a reasonable number or not. I'm sure someone will
provide some additional input...

Jeff
From: Uwe Klein on
Jeff Godfrey wrote:
> crouzilles wrote:
>
>> Hello,
>>
>> I would like to know if a Tcl server created with the socket command
>> can handle multiple clients (1000s) or does one need to use threads
>> for this?
>>
>> Thank you
>
>
> It'll definitely handle multiple (many) clients, though I don't know
> whether thousands is a reasonable number or not. I'm sure someone will
> provide some additional input...

usually you run into filehandle (number of open files) limitations.

Otherwise it works perfectly.

You will have to work via fileevents
i.e. the [command] that is invoked with $sock $client $clientport
info you specify for the server socket will have to set up at
least a readable fileevent for $sock

see:
http://wiki.tcl.tk/_/search?S=server+socket
>
> Jeff

uwe