Integration of socket activation for services
authorJosé Bollo <jose.bollo@iot.bzh>
Mon, 13 Mar 2017 15:18:23 +0000 (16:18 +0100)
committerJosé Bollo <jose.bollo@iot.bzh>
Mon, 13 Mar 2017 15:28:25 +0000 (16:28 +0100)
commite85e5d8ffe242f826b5f98e2834407b5d4c46690
tree39a48653735a3bea22fcd2a48a080ee83e6838c4
parente2c431bcda7f057b4767c3e8142b9e0ca0d32bc6
Integration of socket activation for services

The services provided using the option --ws-server
can now be linked to socket activation of systemd.

When afb-daemon is launched, the api to be provided
by socket activation is declared by adding the
option

   --ws-server=sd:APINAME

Where APINAME is the name of the provided api.

The binder looks to the prefix "sd:" to automatically
use the "listen fd" of name APINAME for serving
the api APINAME.

In the socket activation unit the connection
to this socket must be named using the
directive FileDescriptorName as below:

[socket]
FileDescriptorName=APINAME
...

Change-Id: I281e1a2b9fed3eac3bd0ee27b7f56df99df7bbd6
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/afb-api-ws.c