From owner-freebsd-hackers Thu Nov 16 4:27: 2 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from chuggalug.clues.com (chuggalug.clues.com [194.159.1.85]) by hub.freebsd.org (Postfix) with ESMTP id 4B67D37B479 for ; Thu, 16 Nov 2000 04:26:54 -0800 (PST) Received: (from geoffb@localhost) by chuggalug.clues.com (8.9.3/8.9.3) id MAA92776; Thu, 16 Nov 2000 12:32:48 GMT (envelope-from geoffb) Date: Thu, 16 Nov 2000 12:32:48 +0000 From: Geoff Buckingham To: Nicolai Petri Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Multithreaded tcp-server or non-blocking ? Message-ID: <20001116123248.B92673@chuggalug.clues.com> References: <021501c04fb9$574f9030$6732a8c0@atomic.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <021501c04fb9$574f9030$6732a8c0@atomic.dk>; from Nicolai Petri on Thu, Nov 16, 2000 at 11:38:14AM +0100 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Nov 16, 2000 at 11:38:14AM +0100, Nicolai Petri wrote: > What's the best approach for a simple web-server(never more the 10 clients) > ? Is it using pthread and a thread per connection . Or to make a > non-blocking single thread server. Can people show me some simple examples > of the 2 techniques ? > Depending on exactly what you are trying to achieve you may want to take a look at thttpd, if you have not allready seen it. It is select based though: http://www.acme.com/software/thttpd/notes.html#select -- GeoffB To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message