Sha256: 642541e15096548824c95f0ceb856fdd19ac0fd53e91b4a18d95c7812410cbf1

Contents?: true

Size: 701 Bytes

Versions: 3

Compression:

Stored size: 701 Bytes

Contents

# frozen_string_literal: true

module Wamp
  module MessageHandler
    # Registered callback
    class Registered < Base
      def handle
        validate_received_message

        store[alt_store_key] = { handler: stored_data.fetch(:handler), procedure: stored_data.fetch(:procedure) }
        store_procedure

        deliver_response(response)
      end

      def response
        Type::Registration.new(registration_id: message.registration_id)
      end

      def alt_store_key
        "registration_#{message.registration_id}"
      end

      def store_procedure
        procedure = stored_data.fetch(:procedure)
        store[procedure] = message.registration_id
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
xconn-0.1.2 lib/wamp/message_handler/registered.rb
xconn-0.1.1 lib/wamp/message_handler/registered.rb
xconn-0.1.0 lib/wamp/message_handler/registered.rb