提交 11449f3d 编写于 作者: L Liu Jicong

refine heartbeat interface

上级 5c73c1ff
...@@ -38,7 +38,7 @@ typedef struct SClientHbKey { ...@@ -38,7 +38,7 @@ typedef struct SClientHbKey {
} SClientHbKey; } SClientHbKey;
typedef struct SClientHbReq { typedef struct SClientHbReq {
SClientHbKey hbKey; SClientHbKey connKey;
SHashObj* info; // hash<Slv.key, Sklv> SHashObj* info; // hash<Slv.key, Sklv>
} SClientHbReq; } SClientHbReq;
...@@ -51,8 +51,10 @@ typedef struct SClientHbHandleResult { ...@@ -51,8 +51,10 @@ typedef struct SClientHbHandleResult {
} SClientHbHandleResult; } SClientHbHandleResult;
typedef struct SClientHbRsp { typedef struct SClientHbRsp {
int32_t connId; SClientHbKey connKey;
int32_t hbType; int32_t status;
int32_t bodyLen;
void* body;
} SClientHbRsp; } SClientHbRsp;
typedef struct SClientHbBatchRsp { typedef struct SClientHbBatchRsp {
...@@ -118,7 +120,7 @@ static FORCE_INLINE void* taosDecodeSClientHbKey(void* buf, SClientHbKey* pKey) ...@@ -118,7 +120,7 @@ static FORCE_INLINE void* taosDecodeSClientHbKey(void* buf, SClientHbKey* pKey)
static FORCE_INLINE int tSerializeSClientHbReq(void** buf, const SClientHbReq* pReq) { static FORCE_INLINE int tSerializeSClientHbReq(void** buf, const SClientHbReq* pReq) {
int tlen = 0; int tlen = 0;
tlen += taosEncodeSClientHbKey(buf, &pReq->hbKey); tlen += taosEncodeSClientHbKey(buf, &pReq->connKey);
void* pIter = NULL; void* pIter = NULL;
void* data; void* data;
...@@ -137,7 +139,7 @@ static FORCE_INLINE int tSerializeSClientHbReq(void** buf, const SClientHbReq* p ...@@ -137,7 +139,7 @@ static FORCE_INLINE int tSerializeSClientHbReq(void** buf, const SClientHbReq* p
static FORCE_INLINE void* tDeserializeClientHbReq(void* buf, SClientHbReq* pReq) { static FORCE_INLINE void* tDeserializeClientHbReq(void* buf, SClientHbReq* pReq) {
ASSERT(pReq->info != NULL); ASSERT(pReq->info != NULL);
buf = taosDecodeSClientHbKey(buf, &pReq->hbKey); buf = taosDecodeSClientHbKey(buf, &pReq->connKey);
// TODO: error handling // TODO: error handling
if (pReq->info == NULL) { if (pReq->info == NULL) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册