Class: NIO::WebSocket::Adapter::ProxyAdapter
- Inherits:
-
RawAdapter
- Object
- RawAdapter
- NIO::WebSocket::Adapter::ProxyAdapter
- Defined in:
- lib/nio/websocket/adapter/proxy.rb
Instance Attribute Summary
Attributes inherited from RawAdapter
#closing, #inner, #monitor, #options
Instance Method Summary collapse
-
#initialize(io, options, &block) ⇒ ProxyAdapter
constructor
A new instance of ProxyAdapter.
- #read ⇒ Object
Methods inherited from RawAdapter
#add_to_reactor, #close, #pump_buffer, #teardown, #write
Constructor Details
#initialize(io, options, &block) ⇒ ProxyAdapter
Returns a new instance of ProxyAdapter.
25 26 27 28 |
# File 'lib/nio/websocket/adapter/proxy.rb', line 25 def initialize(io, , &block) super io, @read_event = block end |
Instance Method Details
#read ⇒ Object
30 31 32 33 34 |
# File 'lib/nio/websocket/adapter/proxy.rb', line 30 def read super do |data| @read_event.call data end end |