socket.io-client
Socket.IO client for the browser and node.js
Last updated 8 years ago .
Repository · Original npm · Tarball · package.json
$ cnpm install socket.io-client 
SYNC missed versions from official npm registry.

socket.io-client

Build Status Dependency Status devDependency Status NPM version Downloads

Sauce Test Status

How to use

A standalone build of socket.io-client is exposed automatically by the socket.io server as /socket.io/socket.io.js. Alternatively you can serve the file socket.io.js found in the dist folder or include it via CDN.

<script src="/socket.io/socket.io.js"></script>
<script>
  var socket = io('http://localhost');
  socket.on('connect', function(){});
  socket.on('event', function(data){});
  socket.on('disconnect', function(){});
</script>
// with ES6 import
import io from 'socket.io-client';

const socket = io('http://localhost');

A slim build (without JSON3, a JSON polyfill for IE6/IE7, and debug) is also available: socket.io.slim.js.

Socket.IO is compatible with browserify and webpack (see example there).

Node.JS (server-side usage)

Add socket.io-client to your package.json and then:

var socket = require('socket.io-client')('http://localhost');
socket.on('connect', function(){});
socket.on('event', function(data){});
socket.on('disconnect', function(){});

API

See API

License

MIT

Current Tags

  • 2.3.0                                ...           latest (4 days ago)

81 Versions

  • 2.3.0                                ...           4 days ago
  • 2.2.0                                ...           10 months ago
  • 2.1.1                                ...           a year ago
  • 2.1.0                                ...           a year ago
  • 2.0.4                                ...           2 years ago
  • 2.0.3                                ...           2 years ago
  • 2.0.2                                ...           2 years ago
  • 2.0.1                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 1.7.4                                ...           2 years ago
  • 1.7.3                                ...           3 years ago
  • 1.7.2                                ...           3 years ago
  • 1.7.1                                ...           3 years ago
  • 1.7.0                                ...           3 years ago
  • 1.6.0                                ...           3 years ago
  • 1.5.1                                ...           3 years ago
  • 1.5.0                                ...           3 years ago
  • 1.4.8                                ...           3 years ago
  • 1.4.7                                ...           3 years ago
  • 1.4.6                                ...           3 years ago
  • 1.4.5                                ...           4 years ago
  • 1.4.4                                ...           4 years ago
  • 1.4.3                                ...           4 years ago
  • 1.4.2                                ...           4 years ago
  • 1.4.1                                ...           4 years ago
  • 1.4.0                                ...           4 years ago
  • 1.3.7                                ...           4 years ago
  • 1.3.6                                ...           4 years ago
  • 1.3.5                                ...           5 years ago
  • 1.3.4                                ...           5 years ago
  • 1.3.3                                ...           5 years ago
  • 1.3.2                                ...           5 years ago
  • 1.3.1                                ...           5 years ago
  • 1.3.0                                ...           5 years ago
  • 1.2.1                                ...           5 years ago
  • 1.2.0                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.6                                ...           5 years ago
  • 1.0.5                                ...           5 years ago
  • 1.0.4                                ...           5 years ago
  • 1.0.3                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 0.9.17                                ...           5 years ago
  • 1.0.0-pre5                                ...           5 years ago
  • 1.0.0-pre4                                ...           5 years ago
  • 1.0.0-pre3                                ...           5 years ago
  • 1.0.0-pre2                                ...           5 years ago
  • 1.0.0-pre                                ...           6 years ago
  • 0.9.16                                ...           6 years ago
  • 0.9.15                                ...           6 years ago
  • 0.9.11                                ...           7 years ago
  • 0.9.10                                ...           7 years ago
  • 0.9.9                                ...           7 years ago
  • 0.9.8                                ...           7 years ago
  • 0.9.7                                ...           7 years ago
  • 0.9.6                                ...           7 years ago
  • 0.9.5                                ...           7 years ago
  • 0.9.4                                ...           7 years ago
  • 0.9.3                                ...           7 years ago
  • 0.9.2                                ...           8 years ago
  • 0.9.1-1                                ...           8 years ago
  • 0.9.1                                ...           8 years ago
  • 0.9.0                                ...           8 years ago
  • 0.8.7                                ...           8 years ago
  • 0.8.6                                ...           8 years ago
  • 0.8.5                                ...           8 years ago
  • 0.8.4                                ...           8 years ago
  • 0.8.3                                ...           8 years ago
  • 0.8.2                                ...           8 years ago
  • 0.8.1                                ...           8 years ago
  • 0.8.0                                ...           8 years ago
  • 0.7.11                                ...           8 years ago
  • 0.7.10                                ...           8 years ago
  • 0.7.9                                ...           8 years ago
  • 0.7.5                                ...           8 years ago
  • 0.7.4                                ...           8 years ago
  • 0.7.3                                ...           8 years ago
  • 0.7.2                                ...           8 years ago
  • 0.7.1                                ...           8 years ago
  • 0.7.0                                ...           8 years ago
Downloads
Today 4,502
This Week 10,773
This Month 101,792
Last Day 6,271
Last Week 35,834
Last Month 137,473
Dependencies (3)
Dev Dependencies (6)
Dependents (3936)

Copyright 2014 - 2016 © taobao.org |