File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -74,8 +74,6 @@ WebSocket.prototype.name = 'websocket';
7474WebSocket . prototype . onSocketConnect = function ( ) {
7575 var self = this ;
7676
77- this . socket . setNoDelay ( true ) ;
78-
7977 if ( this . req . headers . upgrade !== 'websocket' ) {
8078 this . log . warn ( this . name + ' connection invalid' ) ;
8179 this . end ( ) ;
@@ -133,6 +131,12 @@ WebSocket.prototype.write = function (data) {
133131 }
134132} ;
135133
134+ /**
135+ * Frame server-to-client output as a text packet.
136+ *
137+ * @api private
138+ */
139+
136140WebSocket . prototype . frame = function ( opcode , data ) {
137141 var startOffset = 2 , secondByte = data . length , buf ;
138142 if ( data . length > 125 ) {
@@ -236,11 +240,12 @@ function Parser () {
236240 self . error ( 'packets with length spanning more than 32 bit is currently not supported' ) ;
237241 return ;
238242 }
239- var lengthBytes = data . slice ( 4 ) ; // cap to 32 bit length
243+ var lengthBytes = data . slice ( 4 ) ; // note: cap to 32 bit length
240244 expectData ( util . unpack ( data ) ) ;
241245 } ) ;
242246 }
243247 } ,
248+ // close
244249 '8' : function ( data ) {
245250 self . emit ( 'close' ) ;
246251 self . reset ( ) ;
You can’t perform that action at this time.
0 commit comments