File tree 3 files changed +30
-30
lines changed
3 files changed +30
-30
lines changed Original file line number Diff line number Diff line change @@ -65,8 +65,17 @@ Writer.prototype.once = function() {};
65
65
Writer . prototype . emit = function ( ) { } ;
66
66
67
67
68
+ function flow ( ) {
69
+ var dest = this . dest ;
70
+ var res = dest . write ( chunk , encoding ) ;
71
+ if ( ! res )
72
+ dest . once ( 'drain' , this . flow ) ;
73
+ else
74
+ process . nextTick ( this . flow ) ;
75
+ }
76
+
68
77
function Reader ( ) {
69
- this . flow = this . flow . bind ( this ) ;
78
+ this . flow = flow . bind ( this ) ;
70
79
this . readable = true ;
71
80
}
72
81
@@ -76,15 +85,6 @@ Reader.prototype.pipe = function(dest) {
76
85
return dest ;
77
86
} ;
78
87
79
- Reader . prototype . flow = function ( ) {
80
- var dest = this . dest ;
81
- var res = dest . write ( chunk , encoding ) ;
82
- if ( ! res )
83
- dest . once ( 'drain' , this . flow ) ;
84
- else
85
- process . nextTick ( this . flow ) ;
86
- } ;
87
-
88
88
89
89
function server ( ) {
90
90
var reader = new Reader ( ) ;
Original file line number Diff line number Diff line change @@ -65,8 +65,17 @@ Writer.prototype.once = function() {};
65
65
Writer . prototype . emit = function ( ) { } ;
66
66
67
67
68
+ function flow ( ) {
69
+ var dest = this . dest ;
70
+ var res = dest . write ( chunk , encoding ) ;
71
+ if ( ! res )
72
+ dest . once ( 'drain' , this . flow ) ;
73
+ else
74
+ process . nextTick ( this . flow ) ;
75
+ }
76
+
68
77
function Reader ( ) {
69
- this . flow = this . flow . bind ( this ) ;
78
+ this . flow = flow . bind ( this ) ;
70
79
this . readable = true ;
71
80
}
72
81
@@ -76,15 +85,6 @@ Reader.prototype.pipe = function(dest) {
76
85
return dest ;
77
86
} ;
78
87
79
- Reader . prototype . flow = function ( ) {
80
- var dest = this . dest ;
81
- var res = dest . write ( chunk , encoding ) ;
82
- if ( ! res )
83
- dest . once ( 'drain' , this . flow ) ;
84
- else
85
- process . nextTick ( this . flow ) ;
86
- } ;
87
-
88
88
89
89
function server ( ) {
90
90
var reader = new Reader ( ) ;
Original file line number Diff line number Diff line change @@ -65,8 +65,17 @@ Writer.prototype.once = function() {};
65
65
Writer . prototype . emit = function ( ) { } ;
66
66
67
67
68
+ function flow ( ) {
69
+ var dest = this . dest ;
70
+ var res = dest . write ( chunk , encoding ) ;
71
+ if ( ! res )
72
+ dest . once ( 'drain' , this . flow ) ;
73
+ else
74
+ process . nextTick ( this . flow ) ;
75
+ }
76
+
68
77
function Reader ( ) {
69
- this . flow = this . flow . bind ( this ) ;
78
+ this . flow = flow . bind ( this ) ;
70
79
this . readable = true ;
71
80
}
72
81
@@ -76,15 +85,6 @@ Reader.prototype.pipe = function(dest) {
76
85
return dest ;
77
86
} ;
78
87
79
- Reader . prototype . flow = function ( ) {
80
- var dest = this . dest ;
81
- var res = dest . write ( chunk , encoding ) ;
82
- if ( ! res )
83
- dest . once ( 'drain' , this . flow ) ;
84
- else
85
- process . nextTick ( this . flow ) ;
86
- } ;
87
-
88
88
89
89
function server ( ) {
90
90
var reader = new Reader ( ) ;
You can’t perform that action at this time.
0 commit comments