Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/wlgq2/uv-cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
wlgq2 committed Nov 24, 2019
2 parents 547d5c6 + 2b437fe commit 5fb57cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README_zh_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* C++11风格回调函数:非C语言函数回调,支持非静态类成员函数及lambda。
* TCP及UDP相关类封装:`TcpServer``TcpClient``TcpConnection``TcpAccept``Udp`
* `Timer``TimerWheel`:定时器及时间复杂度为O(1)的心跳超时踢出机制。
* `Async`:异步机制封装。相对于原生libuv async接口,优化了调用多次可能只运行一次的[问题(特性?)][2]。由于libuv几乎所有api都非线程安全,建议使用writeInLoop接口代替直接write(writeInLoop会检查当前调用的线程,如果在loop线程中调用则直接write,否则把write加到loop线程中执行)。
* `Async`:异步机制封装。相对于原生libuv async接口,优化了调用多次可能只运行一次的[问题(特性)][2]。由于libuv几乎所有api都非线程安全,建议使用writeInLoop接口代替直接write(writeInLoop会检查当前调用的线程,如果在loop线程中调用则直接write,否则把write加到loop线程中执行)。
* libuv信号封装。
* `Packet``PacketBuffer`:包与缓存,发送/接受包,用于从TCP字节流解析协议包。由ListBuffer和CycleBuffer两种实现(前者空间友好,后者时间友好)。提供默认Packet消息协议,也可实现自定义任意消息协议(参考[uvnsq][1]实现NSQ消息协议)。
* Log日志输出接口,可绑定至自定义Log库。
Expand Down Expand Up @@ -81,4 +81,4 @@ int main(int argc, char** args)
[1]: https://github.com/wlgq2/uvnsq
[2]: http://docs.libuv.org/en/v1.x/async.html
[2]: http://docs.libuv.org/en/v1.x/async.html

0 comments on commit 5fb57cf

Please sign in to comment.