dk-websocket

1.1.0 • Public • Published

dk-websocket

This is a simple AngularJS provider to handle websockets, designed to work with https://github.com/kacperd/dk-tornado-websocket.

Installation

npm install dk-websocket

Usage

dkWebsocket = require('dk-websocket');

angular.module('your-module', ['dk.websocket']) 
    .service(['websocket', function(websocket){
        websocket.on(...); 
    }])
;

Registering callbacks:

websocket.on(eventName, function(event){});

Emitting event:

websocket.emit(eventName, data);

Package Sidebar

Install

npm i dk-websocket

Weekly Downloads

3

Version

1.1.0

License

ISC

Last publish

Collaborators

  • kacperd