0.2.5 • Published 8 years ago

qufox-client v0.2.5

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

qufox-client

Bower version

qufox javascript client.

Installation

bower install qufox-client

Usage

Create qufox instance with qufox server url.

Sample qufox server is running at http://qufox.com and https://talk.talsu.net

<script src="bower_components/socket.io-client/socket.io.js"></script>
<script src="bower_components/qufox-client/qufox-client.js"></script>
<script>
  // Create qufox instance with qufox server url.
  var qufox = new Qufox('http://qufox.com');

  // Join session. (If session is not exist, auto create.)
  qufox.join('MySession', dataReceived, joinComplete);

  function dataReceived (data) {
    // Write on console.
    console.log(data);
  }

  function joinComplete (result) {
    // Send message on session.
    qufox.send('MySession', 'Hello world.', true);

    // Leave session.
    qufox.leave('MySession');
  }
</script>

Server

qufox server code is in qufox.

0.2.5

8 years ago

0.2.4

8 years ago