From: "Mauricio Fernández" Date: 2003-05-17T00:57:17+09:00 Subject: Re: TCP Sockets On Fri, May 16, 2003 at 08:45:17PM +0900, Brian Candler wrote: > > How do for example P2P clients do that? One thread per connection? > > I don't know what you mean by 'P2P', but a server talking to multiple > clients would indeed normally have a separate thread per client. There's an > example of a fake pop3 server at > http://www.rubygarden.org/ruby?SingletonTutorial > (at the end of section 2) It is my understanding that 1 thread/connection is considered to be less scalable than a M:N model, with M threads taking caring of N sockets each. That applies when using native threads, so I don't know to which extent it can be mapped to Ruby's green ones. -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com MS-DOS, you can't live with it, you can live without it. -- from Lars Wirzenius' .sig