简化协议,

/**
 * Request
 * Cmd: 	| OP(1) | argc(1) | repeat { arglen(4) | arg } |
 *
 * Response
 * Rsp:		| OP(1) | status(1) | datalen(4) | data |
 */

封装客户端进行批处理和单条命令测试。
This commit is contained in:
2026-01-06 19:16:12 +08:00
parent 0dc86f5aa5
commit 144b374aa2
13 changed files with 815 additions and 634 deletions

View File

@@ -34,8 +34,8 @@
#define NEW_KVSTORE 1
typedef int (*msg_handler)(char *msg, int length, char *response);
// typedef int (*msg_handler)(char *msg, int length, char *response);
typedef int (*msg_handler)(char *request, int request_length, int *consumed_out, char *response, int *response_length);
extern int reactor_start(unsigned short port, msg_handler handler);
extern int proactor_start(unsigned short port, msg_handler handler);