Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
127 lines (125 sloc) 3.78 KB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="" xml:lang="en" lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Easy WebSocket - like WebSocket but no server setup and available in any browser</title>
<style type="text/css">
body {
margin-top: 1.0em;
background-color: #22252A;
font-family: "Helvetica,Arial,FreeSans";
color: #EEE;
#container {
margin: 0 auto;
width: 700px;
h1 {
font-size : 3.8em;
text-align : center;
margin-top : 20px;
margin-bottom : 20px;
h1 .small { font-size: 0.4em; }
h1 a {
color : #cd5;
text-decoration: none
h2 {
font-size: 1.5em; color: lightSteelBlue;
h3 {
text-align: center; color: #b523ab;
a { color: #cd5; }
.description {
font-size: 1.2em;
margin-bottom: 20px;
margin-top: 10px;
font-style: italic;
text-align: center;
pre {
background: #000;
color: #EEE;
padding: 15px;
hr { border: 0; width: 80%; border-bottom: 1px solid #aaa;
margin-bottom : 3em;
.tutorial {
font-weight : bolder;
.tutorial b {
font-size : 1.2em;
.footer { text-align:center; padding-top:30px; font-style: italic; }
<div id="container">
<a href="">Easy WebSocket</a>
<div class="description">
like WebSocket but no server setup and available in any browser
<b>EasyWebSocket</b> aims to make realtimes webapps in every browser without the trouble
to setup servers.
<h2>How to Use It</h2>
Include the following in your webpage and it just works.
&lt;script src=""&gt;&lt;/script&gt;
var socket = new EasyWebSocket("ws://");
socket.onopen = function(){
socket.send("hello world!")
socket.onmessage= function(event){
alert("received "+
<p class="tutorial">
<b>Step 1:</b> You connect the socket to a given url
<p class="tutorial">
<b>Step 2:</b> What you send() thru this socket is sent to all sockets connected the same url
<p>See this code <a href="example/example.html">live</a>.
No server setup, no cross-origin issue to care about... <b>It is that easy!</b>
Seeing it work is always nice. Here is a little
<a href="contrib/chat">chat application</a>
on top of EasyWebSocket.
It is possible to <a href="contrib/monitor/">monitor EasyWebSocket time efficiency</a>.
EasyWebSocket is written by <a href="">Jerome Etienne</a>.
The code is available on github at <a href="">EasyWebSocket</a>
under <a href="">MIT license</a>.
The API is copied on the <a href="">WebScocket standard API</a>, thus
compatible and easy to learn.
I did a <a href="">presentation</a> for it.
<!-- google analytic support -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-4037844-15']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);