class Wamp::Client::Message::Goodbye

Goodbye Sent by a Peer to close a previously opened WAMP session. Must be echo'ed by the receiving Peer. Formats:

[GOODBYE, Details|dict, Reason|uri]

Attributes

details[RW]
reason[RW]

Public Class Methods

new(details, reason) click to toggle source
# File lib/wamp/client/message.rb, line 194
def initialize(details, reason)

  self.class.check_dict('details', details)
  self.class.check_uri('reason', reason)

  self.details = details
  self.reason = reason

end
parse(params) click to toggle source
# File lib/wamp/client/message.rb, line 208
def self.parse(params)

  self.check_gte('params list', 3, params.count)
  self.check_equal('message type', self.type, params[0])

  params.shift
  self.new(*params)

end
type() click to toggle source
# File lib/wamp/client/message.rb, line 204
def self.type
  Types::GOODBYE
end

Public Instance Methods

payload() click to toggle source
# File lib/wamp/client/message.rb, line 218
def payload

  payload = [self.class.type]
  payload.push(self.details)
  payload.push(self.reason)

  payload
end
to_s() click to toggle source
# File lib/wamp/client/message.rb, line 227
def to_s
  'GOODBYE > ' + self.payload.to_s
end