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
- #connection_completed ⇒ Object
- #receive_data(data) ⇒ Object
- #ssl_handshake_completed ⇒ Object
- #ssl_verify_peer(cert) ⇒ Object
- #unbind(error = nil) ⇒ Object
- #write(data) ⇒ Object
Instance Attribute Details
#parent ⇒ Object
Returns the value of attribute parent.
93 94 95 |
# File 'lib/faye/websocket/client.rb', line 93 def parent @parent end |
Instance Method Details
#connection_completed ⇒ Object
95 96 97 |
# File 'lib/faye/websocket/client.rb', line 95 def connection_completed parent.__send__(:on_connect, self) end |
#receive_data(data) ⇒ Object
107 108 109 |
# File 'lib/faye/websocket/client.rb', line 107 def receive_data(data) parent.__send__(:parse, data) end |
#ssl_handshake_completed ⇒ Object
103 104 105 |
# File 'lib/faye/websocket/client.rb', line 103 def ssl_handshake_completed parent.__send__(:ssl_handshake_completed) end |
#ssl_verify_peer(cert) ⇒ Object
99 100 101 |
# File 'lib/faye/websocket/client.rb', line 99 def ssl_verify_peer(cert) parent.__send__(:ssl_verify_peer, cert) end |
#unbind(error = nil) ⇒ Object
111 112 113 114 |
# File 'lib/faye/websocket/client.rb', line 111 def unbind(error = nil) parent.__send__(:emit_error, error) if error parent.__send__(:finalize_close) end |
#write(data) ⇒ Object
116 117 118 |
# File 'lib/faye/websocket/client.rb', line 116 def write(data) send_data(data) rescue nil end |