@@ -285,7 +285,7 @@ void TLSWrap::EncOut() {
285
285
for (size_t i = 0 ; i < count; i++)
286
286
buf[i] = uv_buf_init (data[i], size[i]);
287
287
288
- StreamWriteResult res = static_cast <StreamBase*>(stream_ )->Write (bufs, count);
288
+ StreamWriteResult res = underlying_stream ( )->Write (bufs, count);
289
289
if (res.err != 0 ) {
290
290
InvokeQueued (res.err );
291
291
return ;
@@ -505,24 +505,24 @@ AsyncWrap* TLSWrap::GetAsyncWrap() {
505
505
506
506
507
507
bool TLSWrap::IsIPCPipe () {
508
- return static_cast <StreamBase*>(stream_ )->IsIPCPipe ();
508
+ return underlying_stream ( )->IsIPCPipe ();
509
509
}
510
510
511
511
512
512
int TLSWrap::GetFD () {
513
- return static_cast <StreamBase*>(stream_ )->GetFD ();
513
+ return underlying_stream ( )->GetFD ();
514
514
}
515
515
516
516
517
517
bool TLSWrap::IsAlive () {
518
518
return ssl_ != nullptr &&
519
519
stream_ != nullptr &&
520
- static_cast <StreamBase*>(stream_ )->IsAlive ();
520
+ underlying_stream ( )->IsAlive ();
521
521
}
522
522
523
523
524
524
bool TLSWrap::IsClosing () {
525
- return static_cast <StreamBase*>(stream_ )->IsClosing ();
525
+ return underlying_stream ( )->IsClosing ();
526
526
}
527
527
528
528
@@ -582,7 +582,7 @@ int TLSWrap::DoWrite(WriteWrap* w,
582
582
Local<Object> req_wrap_obj =
583
583
w->GetAsyncWrap ()->persistent ().Get (env ()->isolate ());
584
584
w->Dispose ();
585
- w = static_cast <StreamBase*>(stream_ )->CreateWriteWrap (req_wrap_obj);
585
+ w = underlying_stream ( )->CreateWriteWrap (req_wrap_obj);
586
586
return stream_->DoWrite (w, bufs, count, send_handle);
587
587
}
588
588
}
@@ -680,7 +680,7 @@ void TLSWrap::OnStreamRead(ssize_t nread, const uv_buf_t& buf) {
680
680
681
681
682
682
ShutdownWrap* TLSWrap::CreateShutdownWrap (Local<Object> req_wrap_object) {
683
- return static_cast <StreamBase*>(stream_ )->CreateShutdownWrap (req_wrap_object);
683
+ return underlying_stream ( )->CreateShutdownWrap (req_wrap_object);
684
684
}
685
685
686
686
0 commit comments