aboutsummaryrefslogtreecommitdiff
path: root/websocksy.c
diff options
context:
space:
mode:
Diffstat (limited to 'websocksy.c')
-rw-r--r--websocksy.c12
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
*/