[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Receiving data with lwip raw API
From: |
Simon Goldschmidt |
Subject: |
Re: [lwip-users] Receiving data with lwip raw API |
Date: |
Wed, 15 Nov 2017 10:59:17 +0100 |
Giuseppe Modugno wrote:
> I tried to study httpd code and it's not clear to me. If
> LWIP_HTTPD_SUPPORT_REQUESTLIST is defined, code that supports receving
> data in multiple pbufs is enabled.
> [..]
> I don't understand why saving all the received pbufs until all data are
> received. Why don't copy all pbus payload, as they arrive, to a buffer
> associated to the connection (in struct http_state)? In this way the
> received pbufs can be always freed.
You can do it that way. But the you always need the maximum buffer for a
request allocated. Even if, in most cases, the full request comes with the
first segment.
Simon