Make server a struct

This commit is contained in:
2024-10-10 18:20:16 -04:00
parent 57403690ff
commit 884b52b397
3 changed files with 38 additions and 26 deletions
+8 -1
View File
@@ -6,6 +6,13 @@
#include <stdbool.h>
#include <vb.h>
int handle_command(RdbResponse *res, CommandBuf *cmd, VB *sim, bool *running);
typedef struct RdbServer {
VB *sim;
bool running;
} RdbServer;
void rdb_server_init(RdbServer *srv, VB *sim);
int rdb_server_handle_command(RdbServer *srv, CommandBuf *cmd, RdbResponse *res);
int rdb_server_break(RdbServer *srv, RdbResponse *res);
#endif