Test servers

WebSockets echo server
ws://websox.org/echo
ws://websox.org/ws
(with flash emulation for other browsers)

What are WebSockets?

Web sockets is new technology to make real-time web. It gives you ability to perform browser-server conversation in a really fast and effective way.

The Web sockets specification -- developed as part of the HTML5 initiative -- introduced the Web Socket JavaScript interface, which defines a full-duplex single socket connection over which messages can be sent between client and server. The Web Socket standard attempts to simplify much of the complexity around bi-directional web communication and connection management.

Web Sockets represent an alternative to Comet and Ajax. However, each technology has its own unique capabilities. Learn how these technologies vary so you can make the right choice.

As simple, as HTTP!

WebSocket request

GET /demo HTTP/1.1
Upgrade: WebSocket
Connection: Upgrade
Host: site.com
Origin: http://site.com

WebSocket response

HTTP/1.1 101 Web Socket Protocol Handshake
Upgrade: WebSocket
Connection: Upgrade
WebSocket-Origin: http://site.com
WebSocket-Location: ws://site.com/demo

Thats all!

Now you have established websocket connection

WebSockets servers

WebSockets browsers

WebSockets clients

See also