Class: Stenohttp2::Server::ServerFactory
- Inherits:
-
Object
- Object
- Stenohttp2::Server::ServerFactory
- 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
-
#initialize(port) ⇒ ServerFactory
constructor
A new instance of ServerFactory.
- #start ⇒ Object
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
#start ⇒ Object
12 13 14 |
# File 'lib/stenohttp2/server/server_factory.rb', line 12 def start OpenSSL::SSL::SSLServer.new(tcp_server, ctx) end |