examples/game/lib/server.js
function send(conn,schemaName,json,byteLength){

        var buffer = micro.toBinary(json, schemaName,byteLength);

        if (FAKE_LATENCY){
            setTimeout(function(){
                conn.sendBytes(buffer);
            },FAKE_LATENCY);
        }else{
            conn.sendBytes(buffer);
        }
    }
function send(conn,schemaName,json,byteLength){

        var buffer = micro.toBinary(json, schemaName,byteLength);

        if (FAKE_LATENCY){
            setTimeout(function(){
                conn.sendBytes(buffer);
            },FAKE_LATENCY);
        }else{
            conn.sendBytes(buffer);
        }
    }
function send ( conn , schemaName , json , byteLength ) { var buffer = micro . toBinary ( json , schemaName , byteLength ) ; if ( FAKE_LATENCY ) { setTimeout ( function ( ) { conn . sendBytes ( buffer ) ; } , FAKE_LATENCY ) ; } else { conn . sendBytes ( buffer ) ; } }
Helper function that serializes a JSON data object according to a given schema,
and then sends it through a given client connection
@param {object} conn
@param {string} schemaName
@param {object} json
@param {number} [byteLength]
Helper function that serializes a JSON data object according to a given schema and then sends it through a given client connection