mmmmh
This commit is contained in:
parent
82aee127b0
commit
a92b119549
99 changed files with 6922 additions and 5723 deletions
13
websocket.h
Normal file
13
websocket.h
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
#include "arena.h"
|
||||
#include "str.h"
|
||||
|
||||
#define WEBSOCKET_MAGIC "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"
|
||||
#define WEBSOCKET_HTTP_KEY "Sec-WebSocket-Key"
|
||||
|
||||
typedef uintptr_t socket_t;
|
||||
|
||||
bool wsInitialiseSocket(arena_t scratch, socket_t websocket, strview_t key);
|
||||
buffer_t wsEncodeMessage(arena_t *arena, strview_t message);
|
||||
str_t wsDecodeMessage(arena_t *arena, buffer_t message);
|
||||
Loading…
Add table
Add a link
Reference in a new issue