Module: Faye::WebSocket::Client::Connection

Defined in:
lib/faye/websocket/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#parentObject

Returns the value of attribute parent.



87
88
89
# File 'lib/faye/websocket/client.rb', line 87

def parent
  @parent
end

Instance Method Details

#connection_completedObject



89
90
91
# File 'lib/faye/websocket/client.rb', line 89

def connection_completed
  parent.__send__(:on_connect, self)
end

#receive_data(data) ⇒ Object



101
102
103
# File 'lib/faye/websocket/client.rb', line 101

def receive_data(data)
  parent.__send__(:parse, data)
end

#ssl_handshake_completedObject



97
98
99
# File 'lib/faye/websocket/client.rb', line 97

def ssl_handshake_completed
  parent.__send__(:ssl_handshake_completed)
end

#ssl_verify_peer(cert) ⇒ Object



93
94
95
# File 'lib/faye/websocket/client.rb', line 93

def ssl_verify_peer(cert)
  parent.__send__(:ssl_verify_peer, cert)
end

#unbind(error = nil) ⇒ Object



105
106
107
108
# File 'lib/faye/websocket/client.rb', line 105

def unbind(error = nil)
  parent.__send__(:emit_error, error) if error
  parent.__send__(:finalize_close)
end

#write(data) ⇒ Object



110
111
112
# File 'lib/faye/websocket/client.rb', line 110

def write(data)
  send_data(data) rescue nil
end