mirror of
https://github.com/Wessel/c-websocket-server.git
synced 2026-07-12 02:42:13 +02:00
23 lines
318 B
C
23 lines
318 B
C
#ifndef JSON_H
|
|
#define JSON_H
|
|
|
|
typedef struct {
|
|
char* sensorId;
|
|
char* sensorData;
|
|
} Message;
|
|
|
|
typedef struct {
|
|
Message payload;
|
|
char* auth;
|
|
} Envelope;
|
|
|
|
enum RESPONSE_CODES {
|
|
SUCCESS,
|
|
MISSING_JSON,
|
|
MISSING_PAYLOAD,
|
|
MISSING_AUTH
|
|
};
|
|
|
|
int parse_envelope_json(const char* json, Envelope* envelope);
|
|
|
|
#endif |