Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
node_modules Yes. Jul 25, 2013
README Misc improvements to sonicnet. Dec 5, 2013
cmd_client.js Fixed errors. Aug 26, 2014
confirm.html Yes. Jul 25, 2013
package.json Yes. Jul 25, 2013
pair-server.js Yes. Jul 25, 2013
server.js Yes. Jul 25, 2013
start.html Yes. Jul 25, 2013

README

# How to use this server

1. Get wscat (https://github.com/einaros/ws) via npm install ws
2. Connect to the websocket (ws://borismus-pair-ws.nodejitsu.com:80)

## Client A: Initiator

1. Initiate a connection using token using the following command:

    {"type": "start", "token": ...}

2. Get the connection id from the response:

    {"type": ..., "conn_id": X}

3. Send messages via conn_id.

    {"type": "message", "conn_id": X, "message": "hello world"}

## Client B: Confirmer

1. Confirm a token using the following command:

    {"type": "confirm", "token": ...}

2. Get the connection id from the response:

    {"type": ..., "conn_id": X}

3. Send messages via conn_id.

    {"type": "message", "conn_id": X, "message": "hello world"}