Module: PermessageDeflate::Extension
- Included in:
- PermessageDeflate, PermessageDeflate
- Defined in:
- lib/permessage_deflate.rb
Instance Method Summary collapse
- #configure(options) ⇒ Object
- #create_client_session ⇒ Object
- #create_server_session(offers) ⇒ Object
Instance Method Details
#configure(options) ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/permessage_deflate.rb', line 36 def configure() @options ||= nil PermessageDeflate.(, VALID_OPTIONS) = (@options || {}).merge() PermessageDeflate.new() end |
#create_client_session ⇒ Object
44 45 46 |
# File 'lib/permessage_deflate.rb', line 44 def create_client_session ClientSession.new(@options || {}) end |
#create_server_session(offers) ⇒ Object
48 49 50 51 52 53 |
# File 'lib/permessage_deflate.rb', line 48 def create_server_session(offers) offers.each do |offer| return ServerSession.new(@options || {}, offer) if ServerSession.valid_params?(offer) end nil end |