Class: Goliath::Connection
- Inherits:
-
Object
- Object
- Goliath::Connection
- Defined in:
- lib/faye/adapters/goliath.rb
Instance Attribute Summary collapse
-
#socket_stream ⇒ Object
Returns the value of attribute socket_stream.
Instance Method Summary collapse
Instance Attribute Details
#socket_stream ⇒ Object
Returns the value of attribute socket_stream.
2 3 4 |
# File 'lib/faye/adapters/goliath.rb', line 2 def socket_stream @socket_stream end |
Instance Method Details
#goliath_receive_data ⇒ Object
3 |
# File 'lib/faye/adapters/goliath.rb', line 3 alias :goliath_receive_data :receive_data |
#receive_data(data) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/faye/adapters/goliath.rb', line 5 def receive_data(data) if @serving == :websocket socket_stream.receive(data) if socket_stream else goliath_receive_data(data) socket_stream.receive(@parser.upgrade_data) if socket_stream @serving = :websocket if @api.websocket? end end |
#unbind ⇒ Object
15 16 17 18 19 |
# File 'lib/faye/adapters/goliath.rb', line 15 def unbind super ensure socket_stream.fail if socket_stream end |