class H2::Server::HTTP
'h2c' server - for plaintext HTTP/2 connection
NOTE: browsers don't support this and probably never will
@see tools.ietf.org/html/rfc7540#section-3.4 @see hpbn.co/http2/#upgrading-to-http2
Public Class Methods
new(host:, port:, **options, &on_connection)
click to toggle source
create a new h2c server
Calls superclass method
H2::Server::new
# File lib/h2/server.rb, line 77 def initialize host:, port:, **options, &on_connection @tcpserver = Celluloid::IO::TCPServer.new host, port options.merge! host: host, port: port super @tcpserver, options, &on_connection end
Public Instance Methods
run()
click to toggle source
# File lib/h2/server.rb, line 83 def run loop { async.handle_connection @server.accept } end