N2O.JS

INTRO

The n2o.js module provides N2O protocol loop at JavaScript side. The size of n2o.js is 2120 bytes.

CONFIG

This function creates a WebSocket raw connection to N2O WS and sends <<"N2O,",Token/binary>> text packet which invokes NITRO protocol page initialization.

active = false, debug = false, session = "sid", protocol = window.location.protocol == 'https:' ? "wss://" : "ws://", querystring = window.location.pathname + window.location.search, host = window.location.hostname; protos = [$bert];

API

token()

Token returns chached in localStorage session token.

N2O_start()

This function creates a WebSocket raw connection to N2O WS and sends <<"N2O,",Token/binary>> text packet which invokes NITRO protocol page initialization.

function N2O_start() { }

BERT

$bert.protos = [$io,$file]; $bert.on = function onbert(evt, cb) { }

JSON

$client.on = function onclient(evt, callback) { }

You may also want to read: utf8.js, heart.js, nitro.js, bert.js.