lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Issues with netconn callbacks


From: address@hidden
Subject: Re: [lwip-users] Issues with netconn callbacks
Date: Tue, 3 Dec 2019 20:25:12 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1

Am 03.12.2019 um 18:27 schrieb Davide Bettio:
Hello,

Il giorno lun 2 dic 2019 alle ore 21:26 address@hidden
<mailto:address@hidden> <address@hidden <mailto:address@hidden>>
ha scritto:

    So you're running the stock lwIP that comes with ESP32? If so, I don't
    know how "vanilla" this is and how they keep their copy of lwIP up to
    date...


I checked the source. Anyway it is not vanilla, and moreover it is a
quite old version, so recv ignores the nonblocking flag.

I know it's not, which is sad. They haven't responded to my offer of
helping them to mainline things they added (or solving them differently
so they don't need to patch our sources). And not needing to patch our
sources, an upgrade would be much easier...



     > - Is it possible to check if any byte is already in the buffer
    ready to
     > be received?

    Yes, you can use nonblocking receive. Again, see sockets.c if you need
    an example.

As I said before there is no nonblocking receive. Are you aware of any
other way to check if data is ready to be received or not?

Well, you have to keep track of RCVPLUS callbacks for a netconn. For
every pbuf/netbuf enqueued into the recvmbox, you get one RCVPLUS call.
That's how the socket API does it with select/recv, so even with
blocking sockets, you won't actually block.

Regards,
Simon



reply via email to

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