Class: Wamp::MessageHandler::Hello

Inherits:
Base
  • Object
show all
Defined in:
lib/wamp/message_handler/hello.rb

Overview

Hello

Direct Known Subclasses

Challenge

Instance Attribute Summary

Attributes inherited from Base

#connection, #message

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Wamp::MessageHandler::Base

Instance Method Details

#handleObject



7
8
9
10
11
# File 'lib/wamp/message_handler/hello.rb', line 7

def handle
  msg, is_welcome = connection.acceptor.receive(connection.serializer.serialize(message))
  connection.transmit msg
  connection.router.attach_client(connection) if is_welcome
end

#send_messageObject



13
14
15
# File 'lib/wamp/message_handler/hello.rb', line 13

def send_message
  connection.transmit connection.joiner.send_hello
end