Class: Stenohttp2::Server::ServerFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/stenohttp2/server/server_factory.rb

Overview

Server factory creates a HTTP2 ready TCP server and sets up SSL keys

Instance Method Summary collapse

Constructor Details

#initialize(port) ⇒ ServerFactory

Returns a new instance of ServerFactory.



8
9
10
# File 'lib/stenohttp2/server/server_factory.rb', line 8

def initialize(port)
  @tcp_server = TCPServer.new(port)
end

Instance Method Details

#startObject



12
13
14
# File 'lib/stenohttp2/server/server_factory.rb', line 12

def start
  OpenSSL::SSL::SSLServer.new(tcp_server, ctx)
end