diff options
author | cbdev <cb@cbcdn.com> | 2019-05-19 11:03:45 +0200 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2019-05-19 11:03:45 +0200 |
commit | 92638847a3b7f51fb795c7986b793536ece6beee (patch) | |
tree | fe67899cf254c9e00f28a93cc12d4fb1928f2b32 /websocksy.c | |
parent | 75d1e4955b220495f6d2655b18989db567faa5ce (diff) | |
download | websocksy-92638847a3b7f51fb795c7986b793536ece6beee.tar.gz websocksy-92638847a3b7f51fb795c7986b793536ece6beee.tar.bz2 websocksy-92638847a3b7f51fb795c7986b793536ece6beee.zip |
Documentation & peer discovery API
Diffstat (limited to 'websocksy.c')
-rw-r--r-- | websocksy.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/websocksy.c b/websocksy.c index 55e8d35..714c3f5 100644 --- a/websocksy.c +++ b/websocksy.c @@ -37,7 +37,7 @@ char* xstr_lower(char* in){ } #include "network.c" -#include "ws_proto.c" +#include "builtins.c" /* * WebSocket interface & peer discovery configuration @@ -48,9 +48,17 @@ static struct { ws_backend backend; } config = { .host = "::", - .port = "8001" + .port = "8001", + .backend.query = backend_defaultpeer_query }; +int connect_peer(websocket* ws){ + ws->peer = config.backend.query(ws->request_path, ws->protocols, ws->protocol, ws->headers, ws->header, ws); + return 0; +} + +#include "ws_proto.c" + /* * Signal handler, attached to SIGINT */ |