websocket

深入探讨WebSocket技术与实现
本文详细介绍了WebSocket协议的工作流程,提供了多种WebSocket库的选择,并讨论了检查网络连接性的方法及几种常用的网络监控工具。此外,文章还列举了几个模仿WebSocket行为的库,包括GracefulWebSocket等,以及HTML5中用于检测网络状态的polyfills。

http://www.websocket.org/demos.html

http://www.html5rocks.com/en/features/connectivity


The following illustration shows the typical WebSocket workflow:

websocket 库

NET
Internet Information Services 8
http://www.iis.net/
Fleck
https://github.com/statianzo/Fleck
SuperWebSocket
http://superwebsocket.codeplex.com/

 C# Action?

Learn more about FileReader at http://www.html5rocks.com/en/tutorials/
file/dndfiles/

Fiddler is a great tool for monitoring the network activity and inspecting the traffic
of any incoming or outgoing data . Fiddler can be downloaded from http://www.fiddler2.com/fiddler2/

 


Wireshark
Wireshark is a network packet analyzer that captures the packages and displays
their data as accurately as possible.

Wireshark can be downloaded from http://www.wireshark.org/


ZAP is a penetration-testing tool for finding vulnerabilities throughout your web
apps and sites, by performing an attack on them! Like all the preceding tools, ZAP
comes with a handy GUI visualization.

ZAP can be downloaded from https://code.google.com/p/zaproxy/

 

HTML has XMLHttpRequest for determining network availability.
HTML5, though, made it even easier and introduced a way to check whether
the browser can accept web responses. This is achieved via the navigator object:
if (navigator.onLine) {
alert("You are Online");
}
else {
alert("You are Offline");
}


the following are two polyfills for checking network connectivity:

https://github.com/remy/polyfills/blob/master/offline-events.js

http://nouincolor.com/heyoffline.js/

The first one is using XMLHttpRequest, similar to what Smartphone APIs do.


odernizr, a well-known library for detecting HTML5 and CSS3 features, provides
a great list of HTML5 polyfills that can make your life much easier when it comes
to supporting older browsers. Regardless of which HTML5 feature you are using,
there is a corresponding polyfill available at https://github.com/Modernizr/
Modernizr/wiki/HTML5-Cross-Browser-Polyfills
Regarding WebSockets, following are a some of the libraries that mimic the
WebSocket behavior:

Name
Hyperlink
SockJS
https://github.com/sockjs/sockjs-client
socket.io
http://socket.io/
Kaazing WebSocket
Gateway
http://kaazing.com/products/kaazing-websocket-
gateway.html
web-socket-js
http://github.com/gimite/web-socket-js/
Atmosphere
http://jfarcand.wordpress.com/2010/06/15/
using-atmospheres-jquery-plug-in-to-build-
applicationsupporting-both-websocket-and-comet/
Graceful WebSocket
https://github.com/ffdead/jquery-graceful-
websocket
Portal
https://github.com/flowersinthesand/portal
DataChannel
https://github.com/piranna/DataChannel-polyfill


 Graceful
WebSocket 推荐使用

资源:
WebSocket.org
http://www.websocket.org/
Web Platform docs
http://docs.webplatform.org/wiki/apis/
websocket/WebSocket
HTML5 rocks
http://www.html5rocks.com/en/features/
connectivity
HTML5 demos
http://html5demos.com/
Mozilla Developer
Network
https://developer.mozilla.org/en-US/docs/
WebSockets
The WebSockets API
(W3C)
http://www.w3.org/TR/2009/WD-
websockets-20091222/
The source code we demonstrated in this book can be found online at
http://pterneas.com/books/websockets/source-code.


websocket 协议
http://tools.ietf.org/html/rfc6455


http://websocket4net.codeplex.com/  websocket客户端库

转载于:https://www.cnblogs.com/topwill/p/3950675.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值