1.1.0 • Published 8 years ago

dk-websocket v1.1.0

Weekly downloads
1
License
ISC
Repository
github
Last release
8 years ago

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);