Impl basic ws binary proto with data and execution state manipulation
This commit is contained in:
11
inc/proto/handlers/auth.h
Normal file
11
inc/proto/handlers/auth.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#ifndef __PROTO_HANDLERS_AUTH_H__
|
||||
#define __PROTO_HANDLERS_AUTH_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include "context.h"
|
||||
|
||||
uint8_t handle_auth(ClientContext* cctx, ws_cli_conn_t client, const uint8_t* msg, uint64_t msgSize, int msgType);
|
||||
LinkedListEntry* disconnectDueTimeout(EmulContext* emulContext, LinkedListEntry* clientEntry);
|
||||
void handleOnClientAuthDone(ClientContext* ctx, EmulContext* emulContext);
|
||||
|
||||
#endif //ifndef __PROTO_HANDLERS_AUTH_H__
|
||||
10
inc/proto/handlers/control.h
Normal file
10
inc/proto/handlers/control.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef __PROTO_HANDLERS_CONTROL_H__
|
||||
#define __PROTO_HANDLERS_CONTROL_H__
|
||||
|
||||
#include "proto/msg.h"
|
||||
#include "proto/dial.h"
|
||||
|
||||
void handleIncomingControlMessage(BaseMessage* msg, ClientContext* ctx, EmulContext* emulContext);
|
||||
|
||||
|
||||
#endif //ifndef __PROTO_HANDLERS_CONTROL_H__
|
||||
10
inc/proto/handlers/mem.h
Normal file
10
inc/proto/handlers/mem.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef __PROTO_HANDLERS_MEM_H__
|
||||
#define __PROTO_HANDLERS_MEM_H__
|
||||
|
||||
#include "proto/msg.h"
|
||||
#include "proto/dial.h"
|
||||
|
||||
void handleIncomingMemMessage(BaseMessage* msg, ClientContext* ctx, EmulContext* emulContext);
|
||||
|
||||
#endif //ifndef __PROTO_HANDLERS_MEM_H__
|
||||
|
||||
12
inc/proto/handlers/stream.h
Normal file
12
inc/proto/handlers/stream.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef __PROTO_HANDLERS_STREAM_H__
|
||||
#define __PROTO_HANDLERS_STREAM_H__
|
||||
|
||||
#include "proto/msg.h"
|
||||
#include "proto/dial.h"
|
||||
|
||||
|
||||
void unregisterClientStream(EmulContext* emulContext, ClientContext* ctx, uint32_t regId);
|
||||
void unregisterClientStreams(EmulContext* emulContext, ClientContext* ctx);
|
||||
void handleIncomingStreamMessage(BaseMessage* msg, ClientContext* ctx, EmulContext* emulContext);
|
||||
|
||||
#endif //ifndef __PROTO_HANDLERS_STREAM_H__
|
||||
10
inc/proto/handlers/ws.h
Normal file
10
inc/proto/handlers/ws.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef __PROTO_HANDLERS_WS_H__
|
||||
#define __PROTO_HANDLERS_WS_H__
|
||||
|
||||
#include "wsServer/include/ws.h"
|
||||
|
||||
void onWsMessage(ws_cli_conn_t client, const unsigned char *msg, uint64_t size, int type);
|
||||
void onWsClose(ws_cli_conn_t client);
|
||||
void onWsOpen(ws_cli_conn_t client);
|
||||
|
||||
#endif //ifndef __PROTO_HANDLERS_WS_H__
|
||||
Reference in New Issue
Block a user