Skip to content
This repository has been archived by the owner on Aug 16, 2019. It is now read-only.

wf9a5m75/plugin-socket.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

plugin-socket.io

socket.io plugin for PhoneGap/Cordova. Currently Android only.

cordova plugin add https://github.com/wf9a5m75/plugin-socket.io

This plugin uses these libraries:

###Usage

var socket = plugin.socket.io.connect("http://yourhost.com:12345");
socket.on("connect", function() {
  alert("connected");
  
  socket.emit("hi", "My name is Hogehoge", function(res) {
    alert(JSON.stringify(res));
  });
});

socket.one("welcome", function(msg){
  alert(msg);
});

socket.on("error", function(err) {
  alert(err);
});

###Note This plugin works with Socket.io >= 1.0

Sending binary is not available.

About

socket.io plugin for PhoneGap/Cordova

Resources

License

Stars

Watchers

Forks

Packages

No packages published