feat: add context information to requests
This commit is contained in:
parent
6d4b94c55e
commit
dfd27b579d
8 changed files with 241 additions and 183 deletions
|
|
@ -1,5 +1,17 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "event_loop.h"
|
||||
#include "http.h"
|
||||
|
||||
typedef void (*routing_func)(event_loop_conn *);
|
||||
|
||||
routing_func http_route();
|
||||
void http_route(event_loop_conn *conn) {
|
||||
// TODO routing
|
||||
|
||||
// Fallthrough is to return a 404
|
||||
memcpy(conn->wbuf, http_404, http_404_len);
|
||||
|
||||
conn->state = event_loop_conn_state_res;
|
||||
conn->wbuf_size = http_404_len;
|
||||
conn->wbuf_sent = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue