From 9e75b45fbd8b570ec227d6e06833baeb8b073daa Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Thu, 28 Dec 2023 12:30:03 +1300 Subject: [PATCH] Add more methods to `SocketForwarder`. --- lib/openssl/ssl.rb | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/lib/openssl/ssl.rb b/lib/openssl/ssl.rb index e557b8b48..ccc945f2f 100644 --- a/lib/openssl/ssl.rb +++ b/lib/openssl/ssl.rb @@ -252,6 +252,14 @@ def peeraddr to_io.peeraddr end + def local_address + to_io.local_address + end + + def remote_address + to_io.remote_address + end + def setsockopt(level, optname, optval) to_io.setsockopt(level, optname, optval) end @@ -271,6 +279,26 @@ def closed? def do_not_reverse_lookup=(flag) to_io.do_not_reverse_lookup = flag end + + def close_on_exec=(value) + to_io.close_on_exec = value + end + + def close_on_exec? + to_io.close_on_exec? + end + + def wait(*args) + to_io.wait(*args) + end + + def wait_readable(*args) + to_io.wait_readable(*args) + end + + def wait_writable(*args) + to_io.wait_writable(*args) + end end def verify_certificate_identity(cert, hostname)