In Files

  • openssl/lib/openssl/ssl-internal.rb

Parent

Class/Module Index [+]

Quicksearch

OpenSSL::SSL::SSLServer

Attributes

start_immediately[RW]

Public Class Methods

new(svr, ctx) click to toggle source
 
               # File openssl/lib/openssl/ssl-internal.rb, line 186
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
            

Public Instance Methods

accept() click to toggle source
 
               # File openssl/lib/openssl/ssl-internal.rb, line 208
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
            
close() click to toggle source
 
               # File openssl/lib/openssl/ssl-internal.rb, line 221
def close
  @svr.close
end
            
listen(backlog=5) click to toggle source
 
               # File openssl/lib/openssl/ssl-internal.rb, line 200
def listen(backlog=5)
  @svr.listen(backlog)
end
            
shutdown(how=Socket::SHUT_RDWR) click to toggle source
 
               # File openssl/lib/openssl/ssl-internal.rb, line 204
def shutdown(how=Socket::SHUT_RDWR)
  @svr.shutdown(how)
end
            
to_io() click to toggle source
 
               # File openssl/lib/openssl/ssl-internal.rb, line 196
def to_io
  @svr
end