[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] httpserver(-raw) and large files
From: |
Louis Wells |
Subject: |
Re: [lwip-users] httpserver(-raw) and large files |
Date: |
Tue, 26 Feb 2013 09:03:50 -0800 |
Hello,
To my knowledge it does support external file systems.
The way that I have the webserver running, fsdata.c contains all of my web pages. fsdata.c is in external flash.
When http_find_file runs and calls fs_open to find your file you get a file struct with length variables and a pointer to your file which is still sitting in external memory. These variables are then added into the hs struct.
Afterwards http_send_data and http_write get called, finally passing your pointer into tcp_write(it is still pointing at external mem at this point). In tcp_write, your webpage from external memory gets copied into pbufs, which exist in ram and the internal lwip stuff sends your data out.
I just ran through this in my debugger, so I am pretty sure this is how it works. You should be able to just use the normal fs functions. If anyone sees anything wrong with what I said please point it out.
Hope that helps.
On Tue, Feb 26, 2013 at 2:16 AM, Philipp Tölke
<address@hidden> wrote:
Hello everyone,
> I do not believe that it is necessary to even use fs_custom in this
> situation.
Is it correct that the httpserver_raw does not support "external"
filesystems and files that do not fit into the RAM?