summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/multiplex.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/multiplex.c b/src/multiplex.c
index a9eb5b4..40d7e75 100644
--- a/src/multiplex.c
+++ b/src/multiplex.c
@@ -1,4 +1,5 @@
#define AL_LOG_SECTION "multiplex"
+//#define AL_LOG_ENABLE_TRACE
#include <al/log.h>
#include "multiplex.h"
@@ -33,6 +34,17 @@ static void socket_read_callback(struct ev_loop *loop, ev_io *w, s32 revents)
return;
}
+ log_trace("ID byte: 0x%hhx.\n", id);
+ switch (id) {
+ case 0x48: // '(H)EAD'
+ break;
+ case 0x47: // '(G)ET'
+ // Attempt WebSocket upgrade.
+ break;
+ case 0x50: // '(P)OST'
+ break;
+ }
+
ev_io_stop(loop, &conn->event);
struct nn_packet_stream *stream = al_alloc_object(struct nn_packet_stream);