1.0.3 • Published 7 years ago
stable-socket v1.0.3
stable-socket
Install
Install with npm:
npm install stable-socket
API - Set WebSocket, candidate hosts and options
var socket = new StableSocket(require('websockets').WebSocket,
['http://localhost:8000/', 'http://localhost:8001/']
{});
socket.onopen = function() { console.log('Socket opened!') };
socket.send('Hello!');
// => 'Socket opened!'
also use on browser
<script type="text/javascript" src="StableSocket.js"></script>
<script type="text/javascript">
var socket = new StableSocket(WebSocket,
['http://localhost:8000/', 'http://localhost:8001/']
{});
socket.onopen = function() { console.log('Socket opened!') };
socket.send('Hello!');
// => 'Socket opened!'
</script>
1.0.3
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago
0.9.3
7 years ago
0.9.1
8 years ago
0.9.0
8 years ago
0.7.2
8 years ago
0.7.0
8 years ago
0.6.2
9 years ago
0.6.1
9 years ago
0.6.0
9 years ago
0.5.3
9 years ago
0.5.2
9 years ago
0.5.1
10 years ago
0.5.0
10 years ago
0.4.1
10 years ago
0.4.0
10 years ago
0.3.6
10 years ago
0.3.5
10 years ago
0.3.4
10 years ago
0.3.3
10 years ago
0.3.2
10 years ago
0.3.1
10 years ago
0.3.0
10 years ago
0.2.3
10 years ago
0.2.2
10 years ago
0.2.0
10 years ago
0.1.3
10 years ago
0.1.2
10 years ago
0.1.1
10 years ago
0.1.0
10 years ago