packet.js
function Packet(e) {
    if(e instanceof Buffer) {
        this.data   = e;
        this.length = this.data.length;
    }else if((typeof Buffer) != 'undefined' && e.data instanceof Buffer) {
        this.data   = e.data;
        this.length = this.data.length;
    }else{
        this.data   = new DataView(e.data);
        this.length = this.data.byteLength;
    }

    this.offset = 0;
}
function Packet(e) {
    if(e instanceof Buffer) {
        this.data   = e;
        this.length = this.data.length;
    }else if((typeof Buffer) != 'undefined' && e.data instanceof Buffer) {
        this.data   = e.data;
        this.length = this.data.length;
    }else{
        this.data   = new DataView(e.data);
        this.length = this.data.byteLength;
    }

    this.offset = 0;
}
function Packet ( e ) { if ( e instanceof Buffer ) { this . data = e ; this . length = this . data . length ; } else if ( ( typeof Buffer ) != 'undefined' && e . data instanceof Buffer ) { this . data = e . data ; this . length = this . data . length ; } else { this . data = new DataView ( e . data ) ; this . length = this . data . byteLength ; } this . offset = 0 ; }
this file is for internal use with packets
this file is for internal use with packets