# File lib/bunny/channel09.rb, line 20 def close client.channel = self client.send_frame( Qrack::Protocol09::Channel::Close.new(:reply_code => 200, :reply_text => 'bye', :method_id => 0, :class_id => 0) ) method = client.next_method client.check_response(method, Qrack::Protocol09::Channel::CloseOk, "Error closing channel #{number}") @active = false :close_ok end
# File lib/bunny/channel09.rb, line 8 def open client.channel = self client.send_frame(Qrack::Protocol09::Channel::Open.new) method = client.next_method client.check_response(method, Qrack::Protocol09::Channel::OpenOk, "Cannot open channel #{number}") @active = true :open_ok end
# File lib/bunny/channel09.rb, line 34 def open? active end
# File lib/bunny/channel09.rb, line 4 def initialize(client) super end