End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
DRb::DRbSSLSocket.open_server
open_server(uri, config)
lib/drb/ssl.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/drb/ssl.rb, line 267
def self.open_server(uri, config)
uri = 'drbssl://:0' unless uri
host, port, = parse_uri(uri)
if host.size == 0
host = getservername
soc = open_server_inaddr_any(host, port)
else
soc = TCPServer.open(host, port)
end
port = soc.addr[1] if port == 0
@uri = "drbssl://#{host}:#{port}"
ssl_conf = SSLConfig.new(config)
ssl_conf.setup_certificate
ssl_conf.setup_ssl_context
self.new(@uri, soc, ssl_conf, false)
end
Returns a DRb::DRbSSLSocket instance as a server-side connection, with the SSL connected. This is called from DRb::start_service or while connecting to a remote object:
Example
DRb.start_service 'drbssl://localhost:0', front, config
uri is the URI we are connected to, 'drbssl://localhost:0' above, config is our configuration. Either a Hash or DRb::DRbSSLSocket::SSLConfig