Skip to content
Simple long-polling utility which follows the HTML5 Websockets API
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore
README.md
bower.json
karma.conf.js
poller.js
test.js

README.md

Poller.js

Long-polling library that adheres to the WebSocket API

var poller = new Poller("url");

poller.onopen = function() {
    poller.send("test");
};

poller.onmessage = function(e) {
    console.log(e.data);
};

poller.onerror = function() {};
poller.onclose = function() {};
Something went wrong with that request. Please try again.