Class: Wamp::Manager::Connection

Inherits:
Connection::Base
  • Object
show all
Defined in:
lib/wamp/manager/connection.rb

Overview

connection

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Connection

Returns a new instance of Connection.



9
10
11
12
# File 'lib/wamp/manager/connection.rb', line 9

def initialize(*args)
  super
  @session = Session.new(self)
end

Instance Attribute Details

#sessionObject (readonly)

Returns the value of attribute session.



7
8
9
# File 'lib/wamp/manager/connection.rb', line 7

def session
  @session
end

Instance Method Details

#on_message(data) ⇒ Object



14
15
16
17
# File 'lib/wamp/manager/connection.rb', line 14

def on_message(data)
  message = Message.resolve(coder.decode(data))
  session.on_message(message)
end

#on_openObject



19
20
21
# File 'lib/wamp/manager/connection.rb', line 19

def on_open
  send_hello_message
end