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.



63
64
65
# File 'lib/faye/websocket/client.rb', line 63

def parent
  @parent
end

Instance Method Details

#connection_completedObject



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

#unbindObject



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