Files

Bunny::Channel

Public Class Methods

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

Public Instance Methods

close() click to toggle source
# File lib/bunny/channel08.rb, line 20
    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/channel08.rb, line 8
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/channel08.rb, line 34
def open?
        active
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.