change msg type def
This commit is contained in:
parent
5eabe9102c
commit
cc41b9d312
|
@ -42,13 +42,15 @@ extern "C" {
|
||||||
#undef TD_MSG_SEG_CODE_
|
#undef TD_MSG_SEG_CODE_
|
||||||
#include "tmsgdef.h"
|
#include "tmsgdef.h"
|
||||||
|
|
||||||
extern char *tMsgInfo[];
|
extern char* tMsgInfo[];
|
||||||
extern int tMsgDict[];
|
extern int tMsgDict[];
|
||||||
|
|
||||||
#define TMSG_SEG_CODE(TYPE) (((TYPE)&0xff00) >> 8)
|
#define TMSG_SEG_CODE(TYPE) (((TYPE)&0xff00) >> 8)
|
||||||
#define TMSG_SEG_SEQ(TYPE) ((TYPE)&0xff)
|
#define TMSG_SEG_SEQ(TYPE) ((TYPE)&0xff)
|
||||||
#define TMSG_INFO(TYPE) tMsgInfo[tMsgDict[TMSG_SEG_CODE(TYPE)] + TMSG_SEG_SEQ(TYPE)]
|
#define TMSG_INFO(TYPE) tMsgInfo[tMsgDict[TMSG_SEG_CODE(TYPE)] + TMSG_SEG_SEQ(TYPE)]
|
||||||
|
|
||||||
|
typedef uint16_t tmsg_t;
|
||||||
|
|
||||||
// IE type
|
// IE type
|
||||||
#define TSDB_IE_TYPE_SEC 1
|
#define TSDB_IE_TYPE_SEC 1
|
||||||
#define TSDB_IE_TYPE_META 2
|
#define TSDB_IE_TYPE_META 2
|
||||||
|
@ -122,7 +124,7 @@ typedef enum _mgmt_table {
|
||||||
|
|
||||||
typedef struct SBuildTableMetaInput {
|
typedef struct SBuildTableMetaInput {
|
||||||
int32_t vgId;
|
int32_t vgId;
|
||||||
char * tableFullName;
|
char* tableFullName;
|
||||||
} SBuildTableMetaInput;
|
} SBuildTableMetaInput;
|
||||||
|
|
||||||
typedef struct SBuildUseDBInput {
|
typedef struct SBuildUseDBInput {
|
||||||
|
@ -395,7 +397,7 @@ typedef struct SColumnFilterList {
|
||||||
int16_t numOfFilters;
|
int16_t numOfFilters;
|
||||||
union {
|
union {
|
||||||
int64_t placeholder;
|
int64_t placeholder;
|
||||||
SColumnFilterInfo *filterInfo;
|
SColumnFilterInfo* filterInfo;
|
||||||
};
|
};
|
||||||
} SColumnFilterList;
|
} SColumnFilterList;
|
||||||
/*
|
/*
|
||||||
|
@ -784,7 +786,7 @@ typedef struct SMultiTableMeta {
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int32_t dataLen;
|
int32_t dataLen;
|
||||||
char name[TSDB_TABLE_FNAME_LEN];
|
char name[TSDB_TABLE_FNAME_LEN];
|
||||||
char * data;
|
char* data;
|
||||||
} STagData;
|
} STagData;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -24,41 +24,41 @@ extern "C" {
|
||||||
#include "taosdef.h"
|
#include "taosdef.h"
|
||||||
#include "tmsg.h"
|
#include "tmsg.h"
|
||||||
|
|
||||||
#define TAOS_CONN_SERVER 0
|
#define TAOS_CONN_SERVER 0
|
||||||
#define TAOS_CONN_CLIENT 1
|
#define TAOS_CONN_CLIENT 1
|
||||||
|
|
||||||
extern int tsRpcHeadSize;
|
extern int tsRpcHeadSize;
|
||||||
|
|
||||||
typedef struct SRpcConnInfo {
|
typedef struct SRpcConnInfo {
|
||||||
uint32_t clientIp;
|
uint32_t clientIp;
|
||||||
uint16_t clientPort;
|
uint16_t clientPort;
|
||||||
uint32_t serverIp;
|
uint32_t serverIp;
|
||||||
char user[TSDB_USER_LEN];
|
char user[TSDB_USER_LEN];
|
||||||
} SRpcConnInfo;
|
} SRpcConnInfo;
|
||||||
|
|
||||||
typedef struct SRpcMsg {
|
typedef struct SRpcMsg {
|
||||||
uint8_t msgType;
|
tmsg_t msgType;
|
||||||
void *pCont;
|
void * pCont;
|
||||||
int contLen;
|
int contLen;
|
||||||
int32_t code;
|
int32_t code;
|
||||||
void *handle; // rpc handle returned to app
|
void * handle; // rpc handle returned to app
|
||||||
void *ahandle; // app handle set by client
|
void * ahandle; // app handle set by client
|
||||||
} SRpcMsg;
|
} SRpcMsg;
|
||||||
|
|
||||||
typedef struct SRpcInit {
|
typedef struct SRpcInit {
|
||||||
uint16_t localPort; // local port
|
uint16_t localPort; // local port
|
||||||
char *label; // for debug purpose
|
char * label; // for debug purpose
|
||||||
int numOfThreads; // number of threads to handle connections
|
int numOfThreads; // number of threads to handle connections
|
||||||
int sessions; // number of sessions allowed
|
int sessions; // number of sessions allowed
|
||||||
int8_t connType; // TAOS_CONN_UDP, TAOS_CONN_TCPC, TAOS_CONN_TCPS
|
int8_t connType; // TAOS_CONN_UDP, TAOS_CONN_TCPC, TAOS_CONN_TCPS
|
||||||
int idleTime; // milliseconds, 0 means idle timer is disabled
|
int idleTime; // milliseconds, 0 means idle timer is disabled
|
||||||
|
|
||||||
// the following is for client app ecurity only
|
// the following is for client app ecurity only
|
||||||
char *user; // user name
|
char *user; // user name
|
||||||
char spi; // security parameter index
|
char spi; // security parameter index
|
||||||
char encrypt; // encrypt algorithm
|
char encrypt; // encrypt algorithm
|
||||||
char *secret; // key for authentication
|
char *secret; // key for authentication
|
||||||
char *ckey; // ciphering key
|
char *ckey; // ciphering key
|
||||||
|
|
||||||
// call back to process incoming msg, code shall be ignored by server app
|
// call back to process incoming msg, code shall be ignored by server app
|
||||||
void (*cfp)(void *parent, SRpcMsg *, SEpSet *);
|
void (*cfp)(void *parent, SRpcMsg *, SEpSet *);
|
||||||
|
@ -70,19 +70,19 @@ typedef struct SRpcInit {
|
||||||
} SRpcInit;
|
} SRpcInit;
|
||||||
|
|
||||||
int32_t rpcInit();
|
int32_t rpcInit();
|
||||||
void rpcCleanup();
|
void rpcCleanup();
|
||||||
void *rpcOpen(const SRpcInit *pRpc);
|
void * rpcOpen(const SRpcInit *pRpc);
|
||||||
void rpcClose(void *);
|
void rpcClose(void *);
|
||||||
void *rpcMallocCont(int contLen);
|
void * rpcMallocCont(int contLen);
|
||||||
void rpcFreeCont(void *pCont);
|
void rpcFreeCont(void *pCont);
|
||||||
void *rpcReallocCont(void *ptr, int contLen);
|
void * rpcReallocCont(void *ptr, int contLen);
|
||||||
void rpcSendRequest(void *thandle, const SEpSet *pEpSet, SRpcMsg *pMsg, int64_t *rid);
|
void rpcSendRequest(void *thandle, const SEpSet *pEpSet, SRpcMsg *pMsg, int64_t *rid);
|
||||||
void rpcSendResponse(const SRpcMsg *pMsg);
|
void rpcSendResponse(const SRpcMsg *pMsg);
|
||||||
void rpcSendRedirectRsp(void *pConn, const SEpSet *pEpSet);
|
void rpcSendRedirectRsp(void *pConn, const SEpSet *pEpSet);
|
||||||
int rpcGetConnInfo(void *thandle, SRpcConnInfo *pInfo);
|
int rpcGetConnInfo(void *thandle, SRpcConnInfo *pInfo);
|
||||||
void rpcSendRecv(void *shandle, SEpSet *pEpSet, SRpcMsg *pReq, SRpcMsg *pRsp);
|
void rpcSendRecv(void *shandle, SEpSet *pEpSet, SRpcMsg *pReq, SRpcMsg *pRsp);
|
||||||
int rpcReportProgress(void *pConn, char *pCont, int contLen);
|
int rpcReportProgress(void *pConn, char *pCont, int contLen);
|
||||||
void rpcCancelRequest(int64_t rid);
|
void rpcCancelRequest(int64_t rid);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue