Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions io-endpoint.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
71 changes: 0 additions & 71 deletions lib/io/endpoint/ssl_endpoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions releases.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Loading