apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Garrett Rooney" <roo...@electricjellyfish.net>
Subject Re: multi-thread server
Date Mon, 05 Mar 2007 15:23:38 GMT
On 3/3/07, Wakan <wakan@bigfoot.com> wrote:
> I'm a beginner with APR (and C too :))) and I'm trying to create a
> server that opens a thread
> for each accepted connection. In examples there is only a poolset server
> (using multiplexing),
> but I need a multi thread server.
> I tryied to read in apache httpd sources to learne how apache web server
> works, but it's incomprehensible
> for me...
> Someone can help me indicating the right way I can take to create a
> server that creates a new child process or thread (better)
> for each accepted connection?
> Thanks in advance.

You might want to check out the code for svnserve, which has a
multithreaded mode that does what you want and is built on top of APR.
 It's much simpler than the httpd codebase.

http://svn.collab.net/repos/svn/trunk/subversion/svnserve/main.c

Just look at the bits inside the APR_HAS_THREADS ifdefs.

-garrett

Mime
View raw message