Coder Social home page Coder Social logo

littlepoolshark / socket.io-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from socketio/socket.io-client

0.0 3.0 0.0 4.4 MB

Realtime application framework (client)

Home Page: http://socket.io

License: MIT License

Makefile 0.55% JavaScript 99.45%

socket.io-client's Introduction

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.

<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

socket.io-client's People

Contributors

rauchg avatar 3rd-eden avatar darrachequesne avatar nkzawa avatar zweihan avatar dvv avatar kevin-roark avatar paradite avatar digawp avatar alexlmeow avatar mikelimantara avatar rase- avatar defunctzombie avatar pedrorw avatar felixge avatar holic avatar ycarmel avatar einaros avatar danielbeardsley avatar michael-luo avatar crickeys avatar paladox avatar masakij avatar sfilatov avatar peterdavehello avatar tootallnate avatar jdahlq avatar aaron1011 avatar zzzaaa avatar bmalehorn avatar

Watchers

James Cloos avatar sam liu avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.