Class: Wamp::Manager::Event::Invocation

Inherits:
Base
  • Object
show all
Defined in:
lib/wamp/manager/event/invocation.rb

Overview

Unregistered Message Event

Instance Attribute Summary

Attributes inherited from Base

#session

Instance Method Summary collapse

Methods inherited from Base

#emit_event, #error?, #initialize, #listen_event_name, #transmit

Constructor Details

This class inherits a constructor from Wamp::Manager::Event::Base

Instance Method Details

#add_event_listener(&callback) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/wamp/manager/event/invocation.rb', line 10

def add_event_listener(&callback)
  session.on(listen_event_name) do |yield_msg|
    session.off(listen_event_name)
    callback.call(yield_msg)
  end
  transmit
end

#emit_event_nameObject



18
19
20
# File 'lib/wamp/manager/event/invocation.rb', line 18

def emit_event_name
  "registration_#{registration_id}"
end