Skip to content

Commit

Permalink
Merge pull request #8 from vincentLiuxiang/websocket_format
Browse files Browse the repository at this point in the history
format
  • Loading branch information
vincentLiuxiang committed Dec 9, 2016
2 parents ed0392e + c7edf04 commit ab24b83
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions lib/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ var WebSocket = function (socket,config) {
},config);
}



WebSocket.prototype = Object.create(EventEmitter.prototype);
WebSocket.prototype.constructor = WebSocket;

Expand All @@ -45,9 +43,7 @@ WebSocket.prototype.defaultAuth = function (req) {
}

WebSocket.prototype.shakeHand = function (req) {

var noAuth = this.auth ? this.auth(req) : this.defaultAuth(req);

if (noAuth) {
this.socket.end(noAuth);
return this;
Expand Down Expand Up @@ -234,7 +230,6 @@ WebSocket.prototype.decodeFrame = function () {
// Clear handled frame
this.payloadBuffer = this.payloadBuffer.slice(this.start + this.payLoadLen);


// Current frame finshed
this.isSameFrame = false;

Expand All @@ -248,7 +243,6 @@ WebSocket.prototype.decodeFrame = function () {
}
// Last frame accepted
this.proccessFrame();

}

// encode text / binary data
Expand Down Expand Up @@ -287,7 +281,6 @@ WebSocket.prototype.pong = function (data) {
}

WebSocket.prototype.send = function (data,opcode) {

if (!opcode || opcode === 'text') {
opcode = 1;
}
Expand Down

0 comments on commit ab24b83

Please sign in to comment.