experimental-websocket-port: option to create a WebSocket port.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2021-10-18 10:43:33 +10:30
committed by Christian Decker
parent 80a47f1111
commit ed6eaf9171
10 changed files with 142 additions and 33 deletions

View File

@@ -350,7 +350,10 @@ int connectd_init(struct lightningd *ld)
int hsmfd;
struct wireaddr_internal *wireaddrs = ld->proposed_wireaddr;
enum addr_listen_announce *listen_announce = ld->proposed_listen_announce;
const char *websocket_helper_path = "";
const char *websocket_helper_path;
websocket_helper_path = subdaemon_path(tmpctx, ld,
"lightning_websocketd");
if (socketpair(AF_LOCAL, SOCK_STREAM, 0, fds) != 0)
fatal("Could not socketpair for connectd<->gossipd");
@@ -384,7 +387,7 @@ int connectd_init(struct lightningd *ld)
ld->config.use_v3_autotor,
ld->config.connection_timeout_secs,
websocket_helper_path,
0);
ld->websocket_port);
subd_req(ld->connectd, ld->connectd, take(msg), -1, 0,
connect_init_done, NULL);