learn-tars icon indicating copy to clipboard operation
learn-tars copied to clipboard

腾讯开源框架Tars源码学习笔记---从头搭建Tars rpc

Results 2 learn-tars issues
Sort by recently updated
recently updated
newest added

![2019-06-26 23-12-05屏幕截图](https://user-images.githubusercontent.com/22382838/60192297-35508180-9868-11e9-82e8-7ea6c6a71f1c.png) 在你的第一个commit的代码中,为何直接运行/tar-demo 时候,这时候没有客户端连接,epool_wait会被触发有两个事件,先close后noify,我看到代码中这里对应着两个不同的套接字, epoller.add(_shutdown_sock, H64(ET_CLOSE), EPOLLIN); epoller.add(_notify_sock, H64(ET_NOTIFY), EPOLLIN); epoller.add(_sock, H64(ET_LISTEN) | _sock, EPOLLIN); 可是除了第二个参数不同外,就没有什么不同了这里会产生什么影响码.. 还有这里为什么要用H(64)这个宏定义进行左移32位操作额,

同步调用的时候,最后一步是: ``` void CommunicatorEpoll::notify(size_t iSeq,ReqInfoQueue * msgQueue) { if(_notify[iSeq].bValid) { _ep.mod(_notify[iSeq].notify.getfd(),(long long)&_notify[iSeq].stFDInfo, EPOLLIN); assert(_notify[iSeq].stFDInfo.p == (void*)msgQueue); } else { _notify[iSeq].stFDInfo.iType = FDInfo::ET_C_NOTIFY; _notify[iSeq].stFDInfo.p = (void*)msgQueue; _notify[iSeq].stFDInfo.fd = _notify[iSeq].eventFd; _notify[iSeq].stFDInfo.iSeq =...