[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] multi-user webserver

From: Simon Goldschmidt
Subject: Re: [lwip-users] multi-user webserver
Date: Mon, 21 Feb 2011 06:48:53 +0100

Papp Szilveszter <address@hidden> wrote:

> The only problem is it can handle one request at a
> time, so if somebody connected to the webserver and downloading from
> it, another client cannot establish a connection to it.
> My webserver almost the same like the example that can be found on CVS
> / contrib / webserver (which using netconn api).
> Can somebody point me to an example how a multi-user webserver should
> be written using lwip?

When using the (threaded) netconn API, you will have to use multiple threads, 
I.e. Create a new thread for every client connection. The main thread will sit 
in a loop on accept(), while every new netconn returned by accept will be 
passed to a thread.

Using the socket API, you could also use select and nonblocking sockets to 
prevent blocking on one connection.

Another way would be to use the raw API like the other web server in contrib.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]