Module: Faye::WebSocket::Client::Connection
- Defined in:
- lib/faye/websocket/client.rb
Instance Attribute Summary collapse
-
#parent ⇒ Object
Returns the value of attribute parent.
Instance Method Summary collapse
Instance Attribute Details
#parent ⇒ Object
Returns the value of attribute parent.
63 64 65 |
# File 'lib/faye/websocket/client.rb', line 63 def parent @parent end |
Instance Method Details
#connection_completed ⇒ Object
65 66 67 |
# File 'lib/faye/websocket/client.rb', line 65 def connection_completed parent.__send__(:on_connect) end |
#receive_data(data) ⇒ Object
69 70 71 |
# File 'lib/faye/websocket/client.rb', line 69 def receive_data(data) parent.__send__(:receive_data, data) end |
#unbind ⇒ Object
73 74 75 |
# File 'lib/faye/websocket/client.rb', line 73 def unbind parent.close(1006, '', false) end |
#write(data) ⇒ Object
77 78 79 |
# File 'lib/faye/websocket/client.rb', line 77 def write(data) send_data(data) rescue nil end |