Module: H2::Reel::ServerConnection
- Defined in:
- lib/h2/reel/ext.rb
Instance Method Summary collapse
-
#initialize(server, options = {}, &callback) ⇒ Object
then we hijack
Server
construction, and wrap the callback at the last minute with one that sets the server on every connection, before calling the original.
Instance Method Details
#initialize(server, options = {}, &callback) ⇒ Object
then we hijack Server
construction, and wrap the callback at the last minute with one that sets the server on every connection, before calling the original.
36 37 38 39 40 41 42 43 |
# File 'lib/h2/reel/ext.rb', line 36 def initialize server, = {}, &callback super @og_callback = @callback @callback = ->(conn) { conn.server = self @og_callback[conn] } end |