简化协议,

/**
 * 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

@@ -33,6 +33,8 @@ save() -> 全保存数据集。
这里需要在协议中定义消息长度而不是特殊字符做分隔来确定哪些数据是key哪些是value。
还要修改底层不要用strlen和strcpy用memcpy。
### 面试题
1. 为什么会实现kvstore使用场景在哪里