class OpenSSL::SSL::SSLServer

def accept

def accept
  sock = @svr.accept
  begin
    ssl = OpenSSL::SSL::SSLSocket.new(sock, @ctx)
    ssl.sync_close = true
    ssl.accept if @start_immediately
    ssl
  rescue SSLError => ex
    sock.close
    raise ex
  end
end

def accept

def accept
  sock = @svr.accept
  begin
    ssl = OpenSSL::SSL::SSLSocket.new(sock, @ctx)
    ssl.sync_close = true
    ssl.accept if @start_immediately
    ssl
  rescue SSLError => ex
    sock.close
    raise ex
  end
end

def accept

Works similar to TCPServer#accept.
def accept
  # Socket#accept returns [socket, addrinfo].
  # TCPServer#accept returns a socket.
  # The following comma strips addrinfo.
  sock, = @svr.accept
  begin
    ssl = OpenSSL::SSL::SSLSocket.new(sock, @ctx)
    ssl.sync_close = true
    ssl.accept if @start_immediately
    ssl
  rescue Exception => ex
    if ssl
      ssl.close
    else
      sock.close
    end
    raise ex
  end
end

def accept

Works similar to TCPServer#accept.
def accept
  # Socket#accept returns [socket, addrinfo].
  # TCPServer#accept returns a socket.
  # The following comma strips addrinfo.
  sock, = @svr.accept
  begin
    ssl = OpenSSL::SSL::SSLSocket.new(sock, @ctx)
    ssl.sync_close = true
    ssl.accept if @start_immediately
    ssl
  rescue Exception => ex
    if ssl
      ssl.close
    else
      sock.close
    end
    raise ex
  end
end

def close

def close
  @svr.close
end

def close

def close
  @svr.close
end

def close

See IO#close for details.
def close
  @svr.close
end

def close

See IO#close for details.
def close
  @svr.close
end

def initialize(svr, ctx)

def initialize(svr, ctx)
  @svr = svr
  @ctx = ctx
  unless ctx.session_id_context
    session_id = OpenSSL::Digest::MD5.hexdigest($0)
    @ctx.session_id_context = session_id
  end
  @start_immediately = true
end

def initialize(svr, ctx)

def initialize(svr, ctx)
  @svr = svr
  @ctx = ctx
  unless ctx.session_id_context
    session_id = OpenSSL::Digest::MD5.hexdigest($0)
    @ctx.session_id_context = session_id
  end
  @start_immediately = true
end

def initialize(svr, ctx)

* +ctx+ is an instance of OpenSSL::SSL::SSLContext.
* +srv+ is an instance of TCPServer.
Creates a new instance of SSLServer.
def initialize(svr, ctx)
  @svr = svr
  @ctx = ctx
  unless ctx.session_id_context
    # see #6137 - session id may not exceed 32 bytes
    prng = ::Random.new($0.hash)
    session_id = prng.bytes(16).unpack('H*')[0]
    @ctx.session_id_context = session_id
  end
  @start_immediately = true
end

def initialize(svr, ctx)

* +ctx+ is an instance of OpenSSL::SSL::SSLContext.
* +srv+ is an instance of TCPServer.
Creates a new instance of SSLServer.
def initialize(svr, ctx)
  @svr = svr
  @ctx = ctx
  unless ctx.session_id_context
    # see #6137 - session id may not exceed 32 bytes
    prng = ::Random.new($0.hash)
    session_id = prng.bytes(16).unpack('H*')[0]
    @ctx.session_id_context = session_id
  end
  @start_immediately = true
end

def listen(backlog=5)

def listen(backlog=5)
  @svr.listen(backlog)
end

def listen(backlog=5)

def listen(backlog=5)
  @svr.listen(backlog)
end

def listen(backlog=5)

See TCPServer#listen for details.
def listen(backlog=5)
  @svr.listen(backlog)
end

def listen(backlog=5)

See TCPServer#listen for details.
def listen(backlog=5)
  @svr.listen(backlog)
end

def shutdown(how=Socket::SHUT_RDWR)

def shutdown(how=Socket::SHUT_RDWR)
  @svr.shutdown(how)
end

def shutdown(how=Socket::SHUT_RDWR)

def shutdown(how=Socket::SHUT_RDWR)
  @svr.shutdown(how)
end

def shutdown(how=Socket::SHUT_RDWR)

See BasicSocket#shutdown for details.
def shutdown(how=Socket::SHUT_RDWR)
  @svr.shutdown(how)
end

def shutdown(how=Socket::SHUT_RDWR)

See BasicSocket#shutdown for details.
def shutdown(how=Socket::SHUT_RDWR)
  @svr.shutdown(how)
end

def to_io

def to_io
  @svr
end

def to_io

def to_io
  @svr
end

def to_io

Returns the TCPServer passed to the SSLServer when initialized.
def to_io
  @svr
end

def to_io

Returns the TCPServer passed to the SSLServer when initialized.
def to_io
  @svr
end