Sha256: b978ac83392975990abf5e8b54b7e3cdd098c1cb2c6158d1ef56e2de3eef7a30

Contents?: true

Size: 502 Bytes

Versions: 3

Compression:

Stored size: 502 Bytes

Contents

# frozen_string_literal: true

require_relative "base"

module Wamp
  module Manager
    module Event
      # Unregistered Message Event
      class Invocation < Base
        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

        def emit_event_name
          "registration_#{registration_id}"
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
xconn-0.1.2 lib/wamp/manager/event/invocation.rb
xconn-0.1.1 lib/wamp/manager/event/invocation.rb
xconn-0.1.0 lib/wamp/manager/event/invocation.rb