diff --git a/src/rpc/inc/rpcHead.h b/src/rpc/inc/rpcHead.h index dc0cac01435b33b98ca518ecd2314f18f70bc336..5b401ac54be194a38bad2f7680155f5edb8350b4 100644 --- a/src/rpc/inc/rpcHead.h +++ b/src/rpc/inc/rpcHead.h @@ -20,11 +20,6 @@ extern "C" { #endif -// server:0 client:1 tcp:2 udp:0 -#define RPC_CONN_UDPS 0 -#define RPC_CONN_UDPC 1 -#define RPC_CONN_TCPS 2 -#define RPC_CONN_TCPC 3 #define RPC_CONN_TCP 2 extern int tsRpcOverhead; diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index deaf30f42ebf2464ac4696b29e04b29a7e59d3e7..22838a3f7bdac0d89c76e822da3f408dd794e8bf 100644 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -137,6 +137,12 @@ static int tsRpcRefId = -1; static int32_t tsRpcNum = 0; //static pthread_once_t tsRpcInit = PTHREAD_ONCE_INIT; +// server:0 client:1 tcp:2 udp:0 +#define RPC_CONN_UDPS 0 +#define RPC_CONN_UDPC 1 +#define RPC_CONN_TCPS 2 +#define RPC_CONN_TCPC 3 + void *(*taosInitConn[])(uint32_t ip, uint16_t port, char *label, int threads, void *fp, void *shandle) = { taosInitUdpConnection, taosInitUdpConnection,