summaryrefslogtreecommitdiff
path: root/src/muniad.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2012-03-30 11:37:58 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2012-03-30 11:37:58 +0200
commit39e9508260335eb5cd817e9899a11cb011efdbed (patch)
treefe3b9c6dde89be8d77a324e802e67de5d1b32b88 /src/muniad.cc
parent91dad205b83319e00ea8060ca5a63de07b126c8f (diff)
Add observe protocol and connection handler.
Diffstat (limited to 'src/muniad.cc')
-rw-r--r--src/muniad.cc23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/muniad.cc b/src/muniad.cc
index 4523d8a..a414462 100644
--- a/src/muniad.cc
+++ b/src/muniad.cc
@@ -37,25 +37,18 @@
#include "http.h"
#include "task_proto.h"
-
-/* list of supported protocols and callbacks */
+#include "observe_proto.h"
static struct libwebsocket_protocols protocols[] = {
- /* first protocol must always be HTTP handler */
-
- {
- "http-only", /* name */
- callback_http, /* callback */
- 0 /* per_session_data_size */
+ // first protocol must always be HTTP handler
+ { "http-only", callback_http, 0 },
+ { "lws-task-protocol", callback_lws_task,
+ sizeof(struct per_session_data__lws_task)
},
- {
- "lws-task-protocol",
- callback_lws_task,
- sizeof(struct per_session_data__lws_task)
+ { "lws-observe-protocol", callback_lws_observe,
+ sizeof(struct per_session_data__lws_observe)
},
- {
- NULL, NULL, 0 /* End of list */
- }
+ { NULL, NULL, 0 } // End of list
};
static struct option options[] = {