diff --git a/io-endpoint.gemspec b/io-endpoint.gemspec index 531e543..f8f83ee 100644 --- a/io-endpoint.gemspec +++ b/io-endpoint.gemspec @@ -25,4 +25,6 @@ Gem::Specification.new do |spec| spec.files = Dir.glob(["{context,lib}/**/*", "*.md"], File::FNM_DOTMATCH, base: __dir__) spec.required_ruby_version = ">= 3.3" + + spec.add_dependency "openssl", ">= 3.3.0" end diff --git a/lib/io/endpoint/ssl_endpoint.rb b/lib/io/endpoint/ssl_endpoint.rb index 59d871b..7dc8b36 100644 --- a/lib/io/endpoint/ssl_endpoint.rb +++ b/lib/io/endpoint/ssl_endpoint.rb @@ -22,77 +22,6 @@ def start end end - # Represents a module that forwards socket methods to the underlying IO object. - module SocketForwarder - unless method_defined?(:close_on_exec=) - # Set whether the socket should be closed on exec. - # @parameter value [Boolean] Whether to close on exec. - def close_on_exec=(value) - to_io.close_on_exec = value - end - end - - unless method_defined?(:local_address) - # Get the local address of the socket. - # @returns [Addrinfo] The local address. - def local_address - to_io.local_address - end - end - - unless method_defined?(:remote_address) - # Get the remote address of the socket. - # @returns [Addrinfo] The remote address. - def remote_address - to_io.remote_address - end - end - - unless method_defined?(:wait) - # Wait for the socket to become ready. - # @parameter arguments [Array] Arguments to pass to the underlying IO wait method. - # @returns [IO, nil] The socket if ready, nil otherwise. - def wait(*arguments) - to_io.wait(*arguments) - end - end - - unless method_defined?(:wait_readable) - # Wait for the socket to become readable. - # @parameter arguments [Array] Arguments to pass to the underlying IO wait_readable method. - # @returns [IO, nil] The socket if readable, nil otherwise. - def wait_readable(*arguments) - to_io.wait_readable(*arguments) - end - end - - unless method_defined?(:wait_writable) - # Wait for the socket to become writable. - # @parameter arguments [Array] Arguments to pass to the underlying IO wait_writable method. - # @returns [IO, nil] The socket if writable, nil otherwise. - def wait_writable(*arguments) - to_io.wait_writable(*arguments) - end - end - - if IO.method_defined?(:timeout) - unless method_defined?(:timeout) - # Get the timeout for socket operations. - # @returns [Numeric, nil] The timeout value. - def timeout - to_io.timeout - end - end - - unless method_defined?(:timeout=) - # Set the timeout for socket operations. - # @parameter value [Numeric, nil] The timeout value. - def timeout=(value) - to_io.timeout = value - end - end - end - end end end diff --git a/readme.md b/readme.md index 27a6f2e..f7c23b7 100644 --- a/readme.md +++ b/readme.md @@ -16,6 +16,10 @@ Please see the [project documentation](https://socketry.github.io/io-endpoint) f Please see the [project releases](https://socketry.github.io/io-endpointreleases/index) for all releases. +### Unreleased + + - The `openssl` gem 3.3.0 or newer is now required. + ### v0.17.2 - When the unix path is bigger than what can fit into `struct sockaddr_un`, a shorter temporary path will be used instead and a symlink created at the original path. diff --git a/releases.md b/releases.md index dc6a87c..8232d66 100644 --- a/releases.md +++ b/releases.md @@ -1,5 +1,9 @@ # Releases +## Unreleased + + - The `openssl` gem 3.3.0 or newer is now required. + ## v0.17.2 - When the unix path is bigger than what can fit into `struct sockaddr_un`, a shorter temporary path will be used instead and a symlink created at the original path.