Impl basic ws binary proto with data and execution state manipulation
This commit is contained in:
46
inc/context.h
Normal file
46
inc/context.h
Normal file
@@ -0,0 +1,46 @@
|
||||
#ifndef __CONTEXT_H__
|
||||
#define __CONTEXT_H__
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#include "ptQueue/inc/ptQueue.h"
|
||||
#include "wsServer/include/ws.h"
|
||||
|
||||
#include "linkedlist.h"
|
||||
#include "sized_ptr.h"
|
||||
|
||||
#include "streamed.h"
|
||||
|
||||
typedef struct {
|
||||
SizedPtr* bufs;
|
||||
uint8_t buffersCount;
|
||||
_Atomic (uint8_t) readRequestIdx;
|
||||
_Atomic (uint8_t) currWritingIdx;
|
||||
} OutgoingBuffers;
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
uint8_t* emulState;
|
||||
uint64_t* clockCounter;
|
||||
LinkedListEntry** clientsHead;
|
||||
uint8_t* utilizedFlag;
|
||||
OutgoingBuffers* outBufs;
|
||||
DeviceSegStreamReg** deviceStreamRegs;
|
||||
uint8_t** devicesMem;
|
||||
size_t devicesCount;
|
||||
} EmulContext;
|
||||
|
||||
|
||||
typedef struct {
|
||||
pthread_mutex_t registerMutex;
|
||||
ptQueue* regQueue;
|
||||
uint8_t* accessToken;
|
||||
EmulContext* emulContext;
|
||||
_Atomic (uint64_t) seatCounter;
|
||||
} ServerContext;
|
||||
|
||||
|
||||
|
||||
#endif //ifndef __CONTEXT_H__
|
||||
Reference in New Issue
Block a user