[Libwebsockets] systemd socket-activation with libwebsockets

Andy Green andy at warmcat.com
Thu Mar 26 20:06:30 CET 2020

On 3/26/20 6:42 PM, Sean Haugh wrote:
> Hi all,
> Is there any information on using systemd socket-activation with 
> libwebsockets? I tried using lws_adopt_descriptor_host, and although I 
> can see that my application owns the fd in lsof -i -a -p $PID, I'm not 
> sure how to actually use the returned wsi in the LWS event loop. Any 
> help with this would be much appreciated.

Lws supports "adopting" foreign client sockets with specific apis for 
it, but this is basically adopting a prepped listen socket, it's not 
supported today.  For udp the distinction shouldn't matter but it does 
for tcp.

If you're interested in making a patch for it, the business end for 
listen sockets in lws starts here



> Thanks in advance,
> --
> Sean
> _______________________________________________
> Libwebsockets mailing list
> Libwebsockets at ml.libwebsockets.org
> https://libwebsockets.org/mailman/listinfo/libwebsockets

More information about the Libwebsockets mailing list