[Libwebsockets] Enabling/disabling LWS_WITH_FILE_OPS consequences
andy at warmcat.com
Mon Nov 23 11:37:58 CET 2020
On 11/23/20 10:27 AM, Bram Peeters wrote:
> I (noob user) am porting libwebsockets to a new platform and I am
> wondering what functionality I loose if I disable support for file
> operations (LWS_WITH_FILE_OPS) ?
Basically the lws VFS support.
> I tried googling but it did not immediately give me an answer.
> Also what kind of write operations happen if you enable it (volumes &
> frequency). This is to know if this can be redirected to internal
> program flash, or if something big is needed/something with wear leveling.
It doesn't cause any file operations.
If enabled, it will provide a generic VFS struct you can override on
your platform to make file operations do whatever makes sense for your
platform. Lws will use the vfs to, eg, read files to serve. By default
the vfs maps to the generic POSIX file apis but you can override it.
If disabled, if your platform supports files at all it will directly use
the POSIX file access apis on your platform.
> My apologies if this has been asked before, I do not immediately see a
> way to search the mailing archives.
You would probably want to find it out yourself by git grep the sources
and see what it does, it's pretty esoteric.
> Libwebsockets mailing list
> Libwebsockets at ml.libwebsockets.org
More information about the Libwebsockets