Class | OpenSSL::SSL::SSLServer
In: | openssl/lib/openssl/ssl.rb
Parent: | Object

### Methods

accept close listen new to_io

### Included Modules

SocketForwarder

### Attributes

start_immediately | [RW] |

### Public Class methods

new(svr, ctx)

[Source]

    # File openssl/lib/openssl/ssl.rb, line 98
          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()

[Source]

    # File openssl/lib/openssl/ssl.rb, line 116
          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()

[Source]

    # File openssl/lib/openssl/ssl.rb, line 129
          def close
            @svr.close
          end

listen(backlog=5)

[Source]

    # File openssl/lib/openssl/ssl.rb, line 112
          def listen(backlog=5)
            @svr.listen(backlog)
          end

to_io()

[Source]

    # File openssl/lib/openssl/ssl.rb, line 108
          def to_io
            @svr
          end

[Validate]