[Top][All Lists]

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

Re: [lwip-users] Handle multiple connections using netconn API?

From: Grant Edwards
Subject: Re: [lwip-users] Handle multiple connections using netconn API?
Date: Fri, 19 Nov 2021 17:42:14 -0000 (UTC)
User-agent: slrn/1.0.3 (Linux)

On 2021-11-19, goldsimon@gmx.de <goldsimon@gmx.de> wrote:

A short while after I posted that question, it occurred to me that the
race condition should be avoidable by using a counting semaphore to
wake the server thread from the callback functions. The server might
sometimes make more passes through the netconn "list" than needed, but
that's tolerable.

> Of course there is a way: "just" implement the same callback +
> select behaviour as in the socket API. This is, however, not
> included in the lwIP code, you'll have to do that yourself.
> In theory, we could probably move the callback/select code from the
> socket layer to the netconn layer. However, since noone has
> requested this yet, noone worked on this, yet.

I looked at that briefly, but it's a bit hard to see how the callback
and semaphore mechanism actually works behind all of the fd-set
bookkeepping and other socket API emulation code.

reply via email to

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