transComm.h 14.5 KB
Newer Older
dengyihao's avatar
dengyihao 已提交
1 2 3 4 5 6 7 8 9
/*
 * Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
 *
 * This program is free software: you can use, redistribute, and/or modify
 * it under the terms of the GNU Affero General Public License, version 3
 * or later ("AGPL"), as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
dengyihao's avatar
opt rpc  
dengyihao 已提交
10
 * FITNESS FOR A PARTICULAR PURPOSE.  *
dengyihao's avatar
dengyihao 已提交
11 12 13
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
dengyihao's avatar
dengyihao 已提交
14 15
#ifndef _TD_TRANSPORT_COMM_H
#define _TD_TRANSPORT_COMM_H
dengyihao's avatar
dengyihao 已提交
16

dengyihao's avatar
dengyihao 已提交
17 18 19 20
#ifdef __cplusplus
extern "C" {
#endif

dengyihao's avatar
dengyihao 已提交
21 22 23
#include <uv.h>
#include "os.h"
#include "taoserror.h"
dengyihao's avatar
dengyihao 已提交
24
#include "theap.h"
dengyihao's avatar
dengyihao 已提交
25
#include "transLog.h"
dengyihao's avatar
dengyihao 已提交
26 27
#include "transportInt.h"
#include "trpc.h"
dengyihao's avatar
dengyihao 已提交
28
#include "ttrace.h"
dengyihao's avatar
dengyihao 已提交
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
#include "tutil.h"

typedef void* queue[2];
/* Private macros. */
#define QUEUE_NEXT(q) (*(queue**)&((*(q))[0]))
#define QUEUE_PREV(q) (*(queue**)&((*(q))[1]))

#define QUEUE_PREV_NEXT(q) (QUEUE_NEXT(QUEUE_PREV(q)))
#define QUEUE_NEXT_PREV(q) (QUEUE_PREV(QUEUE_NEXT(q)))
/* Initialize an empty queue. */
#define QUEUE_INIT(q)    \
  {                      \
    QUEUE_NEXT(q) = (q); \
    QUEUE_PREV(q) = (q); \
  }

/* Return true if the queue has no element. */
#define QUEUE_IS_EMPTY(q) ((const queue*)(q) == (const queue*)QUEUE_NEXT(q))

/* Insert an element at the back of a queue. */
#define QUEUE_PUSH(q, e)           \
  {                                \
    QUEUE_NEXT(e) = (q);           \
    QUEUE_PREV(e) = QUEUE_PREV(q); \
    QUEUE_PREV_NEXT(e) = (e);      \
    QUEUE_PREV(q) = (e);           \
  }

/* Remove the given element from the queue. Any element can be removed at any *
 * time. */
#define QUEUE_REMOVE(e)                 \
  {                                     \
    QUEUE_PREV_NEXT(e) = QUEUE_NEXT(e); \
    QUEUE_NEXT_PREV(e) = QUEUE_PREV(e); \
  }
dengyihao's avatar
dengyihao 已提交
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
#define QUEUE_SPLIT(h, q, n)       \
  do {                             \
    QUEUE_PREV(n) = QUEUE_PREV(h); \
    QUEUE_PREV_NEXT(n) = (n);      \
    QUEUE_NEXT(n) = (q);           \
    QUEUE_PREV(h) = QUEUE_PREV(q); \
    QUEUE_PREV_NEXT(h) = (h);      \
    QUEUE_PREV(q) = (n);           \
  } while (0)

#define QUEUE_MOVE(h, n)        \
  do {                          \
    if (QUEUE_IS_EMPTY(h)) {    \
      QUEUE_INIT(n);            \
    } else {                    \
      queue* q = QUEUE_HEAD(h); \
      QUEUE_SPLIT(h, q, n);     \
    }                           \
  } while (0)
dengyihao's avatar
dengyihao 已提交
83 84 85 86 87 88 89 90 91 92 93 94 95 96

/* Return the element at the front of the queue. */
#define QUEUE_HEAD(q) (QUEUE_NEXT(q))

/* Return the element at the back of the queue. */
#define QUEUE_TAIL(q) (QUEUE_PREV(q))

/* Iterate over the element of a queue. * Mutating the queue while iterating
 * results in undefined behavior. */
#define QUEUE_FOREACH(q, e) for ((q) = QUEUE_NEXT(e); (q) != (e); (q) = QUEUE_NEXT(q))

/* Return the structure holding the given element. */
#define QUEUE_DATA(e, type, field) ((type*)((void*)((char*)(e)-offsetof(type, field))))

dengyihao's avatar
dengyihao 已提交
97 98
//#define TRANS_RETRY_COUNT_LIMIT 100   // retry count limit
//#define TRANS_RETRY_INTERVAL    15    // retry interval (ms)
dengyihao's avatar
dengyihao 已提交
99
#define TRANS_CONN_TIMEOUT 3000  // connect timeout (ms)
dengyihao's avatar
dengyihao 已提交
100 101
#define TRANS_READ_TIMEOUT 3000  // read timeout  (ms)
#define TRANS_PACKET_LIMIT 1024 * 1024 * 512
dengyihao's avatar
dengyihao 已提交
102

dengyihao's avatar
dengyihao 已提交
103 104 105 106
#define TRANS_MAGIC_NUM 0x5f375a86

#define TRANS_NOVALID_PACKET(src) ((src) != TRANS_MAGIC_NUM ? 1 : 0)

dengyihao's avatar
dengyihao 已提交
107 108 109 110 111 112
#define TRANS_PACKET_LIMIT 1024 * 1024 * 512

#define TRANS_MAGIC_NUM 0x5f375a86

#define TRANS_NOVALID_PACKET(src) ((src) != TRANS_MAGIC_NUM ? 1 : 0)

dengyihao's avatar
formate  
dengyihao 已提交
113
typedef SRpcMsg      STransMsg;
dengyihao's avatar
dengyihao 已提交
114 115
typedef SRpcCtx      STransCtx;
typedef SRpcCtxVal   STransCtxVal;
dengyihao's avatar
formate  
dengyihao 已提交
116
typedef SRpcInfo     STrans;
U
ubuntu 已提交
117 118
typedef SRpcConnInfo STransHandleInfo;

dengyihao's avatar
dengyihao 已提交
119
// ref mgt handle
dengyihao's avatar
dengyihao 已提交
120 121 122 123 124
typedef struct SExHandle {
  void*   handle;
  int64_t refId;
  void*   pThrd;
} SExHandle;
dengyihao's avatar
dengyihao 已提交
125

dengyihao's avatar
dengyihao 已提交
126 127 128 129 130 131 132
/*convet from fqdn to ip */
typedef struct SCvtAddr {
  char ip[TSDB_FQDN_LEN];
  char fqdn[TSDB_FQDN_LEN];
  bool cvt;
} SCvtAddr;

dengyihao's avatar
dengyihao 已提交
133
typedef struct {
dengyihao's avatar
dengyihao 已提交
134 135 136 137 138 139 140 141
  SEpSet epSet;  // ip list provided by app
  SEpSet origEpSet;
  void*  ahandle;   // handle provided by app
  tmsg_t msgType;   // message type
  int8_t connType;  // connection type cli/srv

  int8_t retryCnt;
  int8_t retryLimit;
dengyihao's avatar
dengyihao 已提交
142

dengyihao's avatar
dengyihao 已提交
143 144 145
  STransCtx  appCtx;  //
  STransMsg* pRsp;    // for synchronous API
  tsem_t*    pSem;    // for synchronous API
dengyihao's avatar
dengyihao 已提交
146
  SCvtAddr   cvtAddr;
dengyihao's avatar
dengyihao 已提交
147
  bool       setMaxRetry;
dengyihao's avatar
dengyihao 已提交
148

dengyihao's avatar
dengyihao 已提交
149
  int hThrdIdx;
dengyihao's avatar
dengyihao 已提交
150 151 152 153 154 155
} STransConnCtx;

#pragma pack(push, 1)

typedef struct {
  char version : 4;  // RPC version
dengyihao's avatar
dengyihao 已提交
156 157 158 159
  char comp : 2;     // compression algorithm, 0:no compression 1:lz4
  char noResp : 2;   // noResp bits, 0: resp, 1: resp
  char persist : 2;  // persist handle,0: no persit, 1: persist handle
  char release : 2;
dengyihao's avatar
dengyihao 已提交
160
  char secured : 2;
dengyihao's avatar
dengyihao 已提交
161
  char spi : 2;
dengyihao's avatar
dengyihao 已提交
162
  char hasEpSet : 2;  // contain epset or not, 0(default): no epset, 1: contain epset
dengyihao's avatar
dengyihao 已提交
163

dengyihao's avatar
dengyihao 已提交
164
  char     user[TSDB_UNI_LEN];
dengyihao's avatar
dengyihao 已提交
165
  uint32_t magicNum;
dengyihao's avatar
dengyihao 已提交
166
  STraceId traceId;
dengyihao's avatar
dengyihao 已提交
167 168
  uint64_t ahandle;  // ahandle assigned by client
  uint32_t code;     // del later
dengyihao's avatar
dengyihao 已提交
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183
  uint32_t msgType;
  int32_t  msgLen;
  uint8_t  content[0];  // message body starts from here
} STransMsgHead;

typedef struct {
  int32_t reserved;
  int32_t contLen;
} STransCompMsg;

typedef struct {
  uint32_t timeStamp;
  uint8_t  auth[TSDB_AUTH_LEN];
} STransDigestMsg;

dengyihao's avatar
dengyihao 已提交
184 185
typedef struct {
  uint8_t user[TSDB_UNI_LEN];
dengyihao's avatar
dengyihao 已提交
186
  uint8_t secret[TSDB_PASSWORD_LEN];
dengyihao's avatar
dengyihao 已提交
187 188
} STransUserMsg;

dengyihao's avatar
dengyihao 已提交
189 190
#pragma pack(pop)

dengyihao's avatar
dengyihao 已提交
191
typedef enum { Normal, Quit, Release, Register, Update } STransMsgType;
dengyihao's avatar
dengyihao 已提交
192
typedef enum { ConnNormal, ConnAcquire, ConnRelease, ConnBroken, ConnInPool } ConnStatus;
dengyihao's avatar
dengyihao 已提交
193

dengyihao's avatar
dengyihao 已提交
194
#define container_of(ptr, type, member) ((type*)((char*)(ptr)-offsetof(type, member)))
dengyihao's avatar
dengyihao 已提交
195
#define RPC_RESERVE_SIZE                (sizeof(STranConnCtx))
dengyihao's avatar
dengyihao 已提交
196

dengyihao's avatar
dengyihao 已提交
197
#define rpcIsReq(type) (type & 1U)
dengyihao's avatar
dengyihao 已提交
198

dengyihao's avatar
dengyihao 已提交
199 200
#define TRANS_RESERVE_SIZE (sizeof(STranConnCtx))

dengyihao's avatar
dengyihao 已提交
201 202
#define TRANS_MSG_OVERHEAD           (sizeof(STransMsgHead))
#define transHeadFromCont(cont)      ((STransMsgHead*)((char*)cont - sizeof(STransMsgHead)))
dengyihao's avatar
dengyihao 已提交
203
#define transContFromHead(msg)       (((char*)msg) + sizeof(STransMsgHead))
dengyihao's avatar
dengyihao 已提交
204
#define transMsgLenFromCont(contLen) (contLen + sizeof(STransMsgHead))
dengyihao's avatar
dengyihao 已提交
205 206
#define transContLenFromMsg(msgLen)  (msgLen - sizeof(STransMsgHead));
#define transIsReq(type)             (type & 1U)
dengyihao's avatar
dengyihao 已提交
207

dengyihao's avatar
dengyihao 已提交
208 209
#define transLabel(trans) ((STrans*)trans)->label

dengyihao's avatar
dengyihao 已提交
210 211 212 213
typedef struct SConnBuffer {
  char* buf;
  int   len;
  int   cap;
dengyihao's avatar
opt rpc  
dengyihao 已提交
214
  int   left;
dengyihao's avatar
fix bug  
dengyihao 已提交
215
  int   total;
dengyihao's avatar
dengyihao 已提交
216
  int   invalid;
dengyihao's avatar
dengyihao 已提交
217 218
} SConnBuffer;

dengyihao's avatar
dengyihao 已提交
219 220
typedef void (*AsyncCB)(uv_async_t* handle);

dengyihao's avatar
dengyihao 已提交
221
typedef struct {
dengyihao's avatar
dengyihao 已提交
222 223
  void*         pThrd;
  queue         qmsg;
wafwerar's avatar
wafwerar 已提交
224
  TdThreadMutex mtx;  // protect qmsg;
dengyihao's avatar
dengyihao 已提交
225 226
} SAsyncItem;

dengyihao's avatar
dengyihao 已提交
227 228 229 230
typedef struct {
  int         index;
  int         nAsync;
  uv_async_t* asyncs;
dengyihao's avatar
dengyihao 已提交
231
  int8_t      stop;
dengyihao's avatar
dengyihao 已提交
232 233
} SAsyncPool;

dengyihao's avatar
dengyihao 已提交
234 235
SAsyncPool* transAsyncPoolCreate(uv_loop_t* loop, int sz, void* arg, AsyncCB cb);
void        transAsyncPoolDestroy(SAsyncPool* pool);
dengyihao's avatar
dengyihao 已提交
236
int         transAsyncSend(SAsyncPool* pool, queue* mq);
dengyihao's avatar
dengyihao 已提交
237
bool        transAsyncPoolIsEmpty(SAsyncPool* pool);
dengyihao's avatar
dengyihao 已提交
238

dengyihao's avatar
dengyihao 已提交
239 240 241 242 243 244
#define TRANS_DESTROY_ASYNC_POOL_MSG(pool, msgType, freeFunc) \
  do {                                                        \
    for (int i = 0; i < pool->nAsync; i++) {                  \
      uv_async_t* async = &(pool->asyncs[i]);                 \
      SAsyncItem* item = async->data;                         \
      while (!QUEUE_IS_EMPTY(&item->qmsg)) {                  \
dengyihao's avatar
dengyihao 已提交
245
        tTrace("destroy msg in async pool ");                 \
dengyihao's avatar
dengyihao 已提交
246 247 248 249 250 251 252 253 254
        queue* h = QUEUE_HEAD(&item->qmsg);                   \
        QUEUE_REMOVE(h);                                      \
        msgType* msg = QUEUE_DATA(h, msgType, q);             \
        if (msg != NULL) {                                    \
          freeFunc(msg);                                      \
        }                                                     \
      }                                                       \
    }                                                         \
  } while (0)
dengyihao's avatar
dengyihao 已提交
255

S
Shengliang Guan 已提交
256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279
#define ASYNC_CHECK_HANDLE(exh1, id)                                                                         \
  do {                                                                                                       \
    if (id > 0) {                                                                                            \
      tTrace("handle step1");                                                                                \
      SExHandle* exh2 = transAcquireExHandle(transGetRefMgt(), id);                                          \
      if (exh2 == NULL || id != exh2->refId) {                                                               \
        tTrace("handle %p except, may already freed, ignore msg, ref1:%" PRIu64 ", ref2:%" PRIu64, exh1,     \
               exh2 ? exh2->refId : 0, id);                                                                  \
        goto _return1;                                                                                       \
      }                                                                                                      \
    } else if (id == 0) {                                                                                    \
      tTrace("handle step2");                                                                                \
      SExHandle* exh2 = transAcquireExHandle(transGetRefMgt(), id);                                          \
      if (exh2 == NULL || id == exh2->refId) {                                                               \
        tTrace("handle %p except, may already freed, ignore msg, ref1:%" PRIu64 ", ref2:%" PRIu64, exh1, id, \
               exh2 ? exh2->refId : 0);                                                                      \
        goto _return1;                                                                                       \
      } else {                                                                                               \
        id = exh1->refId;                                                                                    \
      }                                                                                                      \
    } else if (id < 0) {                                                                                     \
      tTrace("handle step3");                                                                                \
      goto _return2;                                                                                         \
    }                                                                                                        \
dengyihao's avatar
dengyihao 已提交
280
  } while (0)
dengyihao's avatar
dengyihao 已提交
281

dengyihao's avatar
dengyihao 已提交
282 283 284 285 286
int  transInitBuffer(SConnBuffer* buf);
int  transClearBuffer(SConnBuffer* buf);
int  transDestroyBuffer(SConnBuffer* buf);
int  transAllocBuffer(SConnBuffer* connBuf, uv_buf_t* uvBuf);
bool transReadComplete(SConnBuffer* connBuf);
dengyihao's avatar
opt rpc  
dengyihao 已提交
287 288
int  transResetBuffer(SConnBuffer* connBuf);
int  transDumpFromBuffer(SConnBuffer* connBuf, char** buf);
dengyihao's avatar
dengyihao 已提交
289

dengyihao's avatar
dengyihao 已提交
290
int transSetConnOption(uv_tcp_t* stream);
dengyihao's avatar
dengyihao 已提交
291

dengyihao's avatar
dengyihao 已提交
292 293 294 295 296
void transRefSrvHandle(void* handle);
void transUnrefSrvHandle(void* handle);

void transRefCliHandle(void* handle);
void transUnrefCliHandle(void* handle);
dengyihao's avatar
dengyihao 已提交
297

dengyihao's avatar
dengyihao 已提交
298 299 300 301 302 303 304 305
int transReleaseCliHandle(void* handle);
int transReleaseSrvHandle(void* handle);

int transSendRequest(void* shandle, const SEpSet* pEpSet, STransMsg* pMsg, STransCtx* pCtx);
int transSendRecv(void* shandle, const SEpSet* pEpSet, STransMsg* pMsg, STransMsg* pRsp);
int transSendResponse(const STransMsg* msg);
int transRegisterMsg(const STransMsg* msg);
int transSetDefaultAddr(void* shandle, const char* ip, const char* fqdn);
U
ubuntu 已提交
306

dengyihao's avatar
dengyihao 已提交
307
int transSockInfo2Str(struct sockaddr* sockname, char* dst);
dengyihao's avatar
dengyihao 已提交
308

dengyihao's avatar
dengyihao 已提交
309 310
int64_t transAllocHandle();

U
ubuntu 已提交
311 312 313
void* transInitServer(uint32_t ip, uint32_t port, char* label, int numOfThreads, void* fp, void* shandle);
void* transInitClient(uint32_t ip, uint32_t port, char* label, int numOfThreads, void* fp, void* shandle);

dengyihao's avatar
formate  
dengyihao 已提交
314 315
void transCloseClient(void* arg);
void transCloseServer(void* arg);
U
ubuntu 已提交
316

dengyihao's avatar
dengyihao 已提交
317
void  transCtxInit(STransCtx* ctx);
dengyihao's avatar
dengyihao 已提交
318
void  transCtxCleanup(STransCtx* ctx);
dengyihao's avatar
dengyihao 已提交
319 320 321
void  transCtxClear(STransCtx* ctx);
void  transCtxMerge(STransCtx* dst, STransCtx* src);
void* transCtxDumpVal(STransCtx* ctx, int32_t key);
dengyihao's avatar
dengyihao 已提交
322
void* transCtxDumpBrokenlinkVal(STransCtx* ctx, int32_t* msgType);
dengyihao's avatar
dengyihao 已提交
323

dengyihao's avatar
dengyihao 已提交
324 325
// request list
typedef struct STransReq {
dengyihao's avatar
dengyihao 已提交
326 327
  queue      q;
  uv_write_t wreq;
dengyihao's avatar
dengyihao 已提交
328 329
} STransReq;

dengyihao's avatar
dengyihao 已提交
330
void  transReqQueueInit(queue* q);
dengyihao's avatar
dengyihao 已提交
331
void* transReqQueuePush(queue* q);
dengyihao's avatar
dengyihao 已提交
332 333 334
void* transReqQueueRemove(void* arg);
void  transReqQueueClear(queue* q);

dengyihao's avatar
dengyihao 已提交
335 336 337
// queue sending msgs
typedef struct {
  SArray* q;
wafwerar's avatar
wafwerar 已提交
338
  void (*freeFunc)(const void* arg);
dengyihao's avatar
dengyihao 已提交
339 340 341 342 343 344
} STransQueue;

/*
 * init queue
 * note: queue'size is small, default 1
 */
wafwerar's avatar
wafwerar 已提交
345
void transQueueInit(STransQueue* queue, void (*freeFunc)(const void* arg));
dengyihao's avatar
dengyihao 已提交
346 347 348 349 350 351

/*
 * put arg into queue
 * if queue'size > 1, return false; else return true
 */
bool transQueuePush(STransQueue* queue, void* arg);
dengyihao's avatar
dengyihao 已提交
352 353 354 355
/*
 * the size of queue
 */
int32_t transQueueSize(STransQueue* queue);
dengyihao's avatar
dengyihao 已提交
356 357 358 359 360
/*
 * pop head from queue
 */
void* transQueuePop(STransQueue* queue);
/*
dengyihao's avatar
dengyihao 已提交
361
 * get ith from queue
dengyihao's avatar
dengyihao 已提交
362
 */
dengyihao's avatar
dengyihao 已提交
363 364 365 366 367
void* transQueueGet(STransQueue* queue, int i);
/*
 * rm ith from queue
 */
void* transQueueRm(STransQueue* queue, int i);
dengyihao's avatar
dengyihao 已提交
368 369 370 371 372 373 374 375 376 377 378 379 380
/*
 * queue empty or not
 */
bool transQueueEmpty(STransQueue* queue);
/*
 * clear queue
 */
void transQueueClear(STransQueue* queue);
/*
 * destroy queue
 */
void transQueueDestroy(STransQueue* queue);

dengyihao's avatar
dengyihao 已提交
381 382 383 384 385 386 387 388
/*
 * delay queue based on uv loop and uv timer, and only used in retry
 */
typedef struct STaskArg {
  void* param1;
  void* param2;
} STaskArg;

dengyihao's avatar
dengyihao 已提交
389 390 391 392 393 394 395 396 397 398 399 400 401
typedef struct SDelayTask {
  void (*func)(void* arg);
  void*    arg;
  uint64_t execTime;
  HeapNode node;
} SDelayTask;

typedef struct SDelayQueue {
  uv_timer_t* timer;
  Heap*       heap;
  uv_loop_t*  loop;
} SDelayQueue;

dengyihao's avatar
dengyihao 已提交
402 403 404
int         transDQCreate(uv_loop_t* loop, SDelayQueue** queue);
void        transDQDestroy(SDelayQueue* queue, void (*freeFunc)(void* arg));
SDelayTask* transDQSched(SDelayQueue* queue, void (*func)(void* arg), void* arg, uint64_t timeoutMs);
dengyihao's avatar
dengyihao 已提交
405
void        transDQCancel(SDelayQueue* queue, SDelayTask* task);
dengyihao's avatar
dengyihao 已提交
406

407
bool transEpSetIsEqual(SEpSet* a, SEpSet* b);
dengyihao's avatar
dengyihao 已提交
408 409 410 411
/*
 * init global func
 */
void transThreadOnce();
dengyihao's avatar
dengyihao 已提交
412

dengyihao's avatar
dengyihao 已提交
413 414 415
void transInit();
void transCleanup();

dengyihao's avatar
dengyihao 已提交
416 417 418 419
void    transFreeMsg(void* msg);
int32_t transCompressMsg(char* msg, int32_t len);
int32_t transDecompressMsg(char** msg, int32_t len);

dengyihao's avatar
dengyihao 已提交
420 421 422 423 424 425 426 427 428 429
int32_t transOpenRefMgt(int size, void (*func)(void*));
void    transCloseRefMgt(int32_t refMgt);
int64_t transAddExHandle(int32_t refMgt, void* p);
int32_t transRemoveExHandle(int32_t refMgt, int64_t refId);
void*   transAcquireExHandle(int32_t refMgt, int64_t refId);
int32_t transReleaseExHandle(int32_t refMgt, int64_t refId);
void    transDestoryExHandle(void* handle);

int32_t transGetRefMgt();
int32_t transGetInstMgt();
dengyihao's avatar
dengyihao 已提交
430

dengyihao's avatar
dengyihao 已提交
431
void transHttpEnvDestroy();
dengyihao's avatar
dengyihao 已提交
432 433 434 435
#ifdef __cplusplus
}
#endif

dengyihao's avatar
dengyihao 已提交
436
#endif  // _TD_TRANSPORT_COMM_H