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.



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

def parent
  @parent
end

Instance Method Details

#connection_completedObject



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_completedObject



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