0.4.4 • Published 12 years ago
json-sockets v0.4.4
json-sockets
a socket optimized for cross-domain use for the web and node. it's easy to use:
var sockets = require('json-sockets');
sockets.listen(9999, function(socket) {
socket.on('message', function(message) {
socket.send(message); // echo
});
});
var socket = sockets.connect('localhost:9999');
socket.send({hello:'world'});
socket.on('message', function(message) {
console.log(message);
});
A main goal of json-sockets is to be simple, cross-domain, cross-browser and purely native js.
To accomplish this the following transport methods are used:
WebSockets
Chrome, Safari, Safari Mobile (fallbacks to CORS on connection timeout)CORS
Firefox 3.5+ Crome, SafariPost-Message + AJAX
Internet Explorer 8+, OperaJSONP
Internet Explorer 7- and everybody else
0.4.4
12 years ago
0.4.3
12 years ago
0.4.2
12 years ago
0.4.1
12 years ago
0.4.0
12 years ago
0.3.0
13 years ago
0.2.6
13 years ago
0.2.5
13 years ago
0.2.4
13 years ago
0.2.3
13 years ago
0.2.2
13 years ago
0.2.1
13 years ago
0.2.0
13 years ago
0.1.8
13 years ago
0.1.7
13 years ago
0.1.6
13 years ago
0.1.5
13 years ago
0.1.4
13 years ago
0.1.3
13 years ago
0.1.2
13 years ago
0.1.1
13 years ago
0.1.0
13 years ago