[Libwebsockets] Enabling/disabling LWS_WITH_FILE_OPS consequences

Bram Peeters Bram.Peeters at dekimo.com
Mon Nov 23 11:48:38 CET 2020


Ok, thank you !

-----Original Message-----
From: Andy Green <andy at warmcat.com> 
Sent: Monday, November 23, 2020 11:38
To: Bram Peeters <Bram.Peeters at dekimo.com>; libwebsockets at ml.libwebsockets.org
Subject: Re: [Libwebsockets] Enabling/disabling LWS_WITH_FILE_OPS consequences



On 11/23/20 10:27 AM, Bram Peeters wrote:
> Hi,
> 
> 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.

-Andy

> Bram
> 
> 
> _______________________________________________
> Libwebsockets mailing list
> Libwebsockets at ml.libwebsockets.org
> https://libwebsockets.org/mailman/listinfo/libwebsockets
> 


More information about the Libwebsockets mailing list