Bunny::Channel

Public Class Methods

new(client) click to toggle source
# File lib/bunny/channel.rb, line 5
def initialize(client)
  super
end

Public Instance Methods

close() click to toggle source
# File lib/bunny/channel.rb, line 21
def close
  client.channel = self
  client.send_frame(Qrack::Protocol::Channel::Close.new(:reply_code => 200, :reply_text => 'bye', :method_id => 0, :class_id => 0))

  method = client.next_method

  client.check_response(method, Qrack::Protocol::Channel::CloseOk, "Error closing channel #{number}")

  @active = false
  :close_ok
end
open() click to toggle source
# File lib/bunny/channel.rb, line 9
def open
  client.channel = self
  client.send_frame(Qrack::Protocol::Channel::Open.new)

  method = client.next_method

  client.check_response(method, Qrack::Protocol::Channel::OpenOk, "Cannot open channel #{number}")

  @active = true
  :open_ok
end
open?() click to toggle source
# File lib/bunny/channel.rb, line 33
def open?
  active
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.