"use strict";var Message=function(){this.rsv1=!1,this.rsv2=!1,this.rsv3=!1,this.opcode=null,this.length=0,this._chunks=[]},instance={read:function(){if(this.data)return this.data;this.data=new Buffer(this.length);for(var s=0,t=0,h=this._chunks.length;t<h;t++)this._chunks[t].copy(this.data,s),s+=this._chunks[t].length;return this.data},pushFrame:function(s){this.rsv1=this.rsv1||s.rsv1,this.rsv2=this.rsv2||s.rsv2,this.rsv3=this.rsv3||s.rsv3,null===this.opcode&&(this.opcode=s.opcode),this._chunks.push(s.payload),this.length+=s.length}};for(var key in instance)Message.prototype[key]=instance[key];module.exports=Message;