@@ -225,6 +225,7 @@ const kOnFileOpened = Symbol('kOnFileOpened');
225225const kOnFileUnpipe = Symbol ( 'kOnFileUnpipe' ) ;
226226const kOnPipedFileHandleRead = Symbol ( 'kOnPipedFileHandleRead' ) ;
227227const kReady = Symbol ( 'kReady' ) ;
228+ const kRemoveFromSocket = Symbol ( 'kRemoveFromSocket' ) ;
228229const kRemoveSession = Symbol ( 'kRemove' ) ;
229230const kRemoveStream = Symbol ( 'kRemoveStream' ) ;
230231const kServerBusy = Symbol ( 'kServerBusy' ) ;
@@ -2247,9 +2248,7 @@ class QuicSession extends EventEmitter {
22472248 return this [ kInternalState ] . handshakeContinuationHistogram ;
22482249 }
22492250
2250- // TODO(addaleax): This is a temporary solution for testing and should be
2251- // removed later.
2252- removeFromSocket ( ) {
2251+ [ kRemoveFromSocket ] ( ) {
22532252 return this [ kHandle ] . removeFromSocket ( ) ;
22542253 }
22552254}
@@ -2695,7 +2694,17 @@ class QuicStream extends Duplex {
26952694 }
26962695
26972696 [ kAfterAsyncWrite ] ( { bytes } ) {
2698- // TODO(@jasnell): Implement this
2697+ // There's currently nothing we need to do here. We have
2698+ // to have this but it's a non-op
2699+ }
2700+
2701+ [ kUpdateTimer ] ( ) {
2702+ // Timeout is implemented in the QuicSession at the native
2703+ // layer. We have to have this here but it's a non-op
2704+ }
2705+
2706+ [ kTrackWriteState ] ( stream , bytes ) {
2707+ // There's currently nothing to do here.
26992708 }
27002709
27012710 [ kInspect ] ( depth , options ) {
@@ -2712,17 +2721,6 @@ class QuicStream extends Duplex {
27122721 } , depth , options ) ;
27132722 }
27142723
2715- [ kTrackWriteState ] ( stream , bytes ) {
2716- // TODO(@jasnell): Not yet sure what we want to do with these
2717- // this.#writeQueueSize += bytes;
2718- // this.#writeQueueSize += bytes;
2719- // this[kHandle].chunksSentSinceLastWrite = 0;
2720- }
2721-
2722- [ kUpdateTimer ] ( ) {
2723- // TODO(@jasnell): Implement this later
2724- }
2725-
27262724 get detached ( ) {
27272725 // The QuicStream is detached if it is yet destroyed
27282726 // but the underlying handle is undefined. While in
@@ -2750,7 +2748,7 @@ class QuicStream extends Duplex {
27502748
27512749 [ kWriteGeneric ] ( writev , data , encoding , cb ) {
27522750 if ( this . destroyed || this . detached )
2753- return ; // TODO(addaleax): Can this happen?
2751+ return ;
27542752
27552753 this [ kUpdateTimer ] ( ) ;
27562754 const req = ( writev ) ?
@@ -2810,7 +2808,7 @@ class QuicStream extends Duplex {
28102808 }
28112809
28122810 _read ( nread ) {
2813- if ( this . destroyed ) { // TODO(addaleax): Can this happen?
2811+ if ( this . destroyed ) {
28142812 this . push ( null ) ;
28152813 return ;
28162814 }
@@ -2910,11 +2908,6 @@ class QuicStream extends Duplex {
29102908 undefined ;
29112909 }
29122910
2913- get bufferSize ( ) {
2914- // TODO(@jasnell): Implement this
2915- return undefined ;
2916- }
2917-
29182911 get id ( ) {
29192912 return this [ kInternalState ] . id ;
29202913 }
@@ -2923,10 +2916,6 @@ class QuicStream extends Duplex {
29232916 return this [ kInternalState ] . push_id ;
29242917 }
29252918
2926- _onTimeout ( ) {
2927- // TODO(@jasnell): Implement this
2928- }
2929-
29302919 get session ( ) {
29312920 return this [ kInternalState ] . session ;
29322921 }
@@ -3127,7 +3116,8 @@ function createSocket(options) {
31273116
31283117module . exports = {
31293118 createSocket,
3130- kUDPHandleForTesting
3119+ kUDPHandleForTesting,
3120+ kRemoveFromSocket,
31313121} ;
31323122
31333123/* eslint-enable no-use-before-define */
0 commit comments