lib/WebSocketFrame.js
function WebSocketFrame(maskBytes, frameHeader, config) {
    this.maskBytes = maskBytes;
    this.frameHeader = frameHeader;
    this.config = config;
    this.maxReceivedFrameSize = config.maxReceivedFrameSize;
    this.protocolError = false;
    this.frameTooLarge = false;
    this.invalidCloseFrameLength = false;
    this.parseState = DECODE_HEADER;
    this.closeStatus = -1;
}
function WebSocketFrame(maskBytes, frameHeader, config) {
    this.maskBytes = maskBytes;
    this.frameHeader = frameHeader;
    this.config = config;
    this.maxReceivedFrameSize = config.maxReceivedFrameSize;
    this.protocolError = false;
    this.frameTooLarge = false;
    this.invalidCloseFrameLength = false;
    this.parseState = DECODE_HEADER;
    this.closeStatus = -1;
}
function WebSocketFrame ( maskBytes , frameHeader , config ) { this . maskBytes = maskBytes ; this . frameHeader = frameHeader ; this . config = config ; this . maxReceivedFrameSize = config . maxReceivedFrameSize ; this . protocolError = false ; this . frameTooLarge = false ; this . invalidCloseFrameLength = false ; this . parseState = DECODE_HEADER ; this . closeStatus = - 1 ; }
WebSocketConnection will pass shared buffer objects for maskBytes and frameHeader into the constructor to avoid tons of small memory allocations for each frame we have to parse.  This is only used for parsing frames we receive off the wire.
WebSocketConnection will pass shared buffer objects for maskBytes and frameHeader into the constructor to avoid tons of small memory allocations for each frame we have to parse . This is only used for parsing frames we receive off the wire .