发布于 2016-10-05 23:01:01 | 208 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的精品教程,程序狗速度看过来!

WebSocket HTML5中的全双工通讯技术

WebSocket是HTML5开始提供的一种浏览器与服务器间进行全双工通讯的网络技术。 WebSocket通信协议于2011年被IETF定为标准 RFC 6455,WebSocketAPI被W3C定为标准。


uWebSockets 0.10.0 发布了,v0.10.0是一个完全重写的库,包括性能提升和bug修复。uWebSockets,是一款高度可拓展的最轻量级、效率最高的WebSocket服务器库之一。它具有易于使用的,完全异步面向对象的接口和与其他竞品对比扩展到数百万连接只使用一小部分内存的特点。详细更新如下:

性能和可伸缩性优化:

  • Node.js:

    • Greatly improved memory scalability. One million connections require 1.3 GB of user space memory - 65% of what v0.9.0 required and 8% of what ws 1.1.0 requires.

    • Slight throughput performance gain (up to 27x faster than ws 1.1.0, up from 24x with v0.9.0).

    • New optional (subject-to-change) low-level C-like interface exposed as require('uws').native - for those who don't mind trading a bit of productivity for improved efficiency.

  • Node.js and/or C++

    • Throughput has been improved ~20% despite the increased level of abstraction (up to 5 million messages echoed per second using the C++ interface and one Intel i5 CPU core).

    • Permessage-deflate requires way less memory per connection (1 byte) due to shared z_stream by default.

新特性:

  • Node.js and C++

    • Client support - thanks to @jimmyt857 for work on the early prototype!

    • Basic subprotocol support (it will simply accept any subprotocol).

  • C++

    • Greatly improved code quality.

    • Plenty of automatic test cases have been added, all passing cleanly under Valgrind.

    • Simplified threading, transfer connections between CPU cores "dynamically" during the connection lifetime.

    • SO_REUSEPORT support (goes well together with connection transferring).

    • Path routing (GET /whateverPath).

    • Concept of groups, one group share callbacks and broadcast scope.

    • New interface allows more complex set-ups (one group can listen to many ports, be it SSL or non-SSL or both)

Bug 修复:

  • Adds proper bounds checking to UTF-8 check.

  • Fixes a potential bug with short writes over SSL connections.

  • Proper SSL renegotiation support (SSL_read might need to write, etc).

  • IPv6 & IPv4 support.

发行说明:

下载地址:



历史版本 :
uWebSockets 0.10.0,可扩展的WebSocket服务器库
uWebSockets 0.9.0,可扩展的WebSocket服务器库
最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务