| Class | Bunny::Channel |
| In: |
lib/bunny/channel08.rb
|
| Parent: | Qrack::Channel |
# File lib/bunny/channel08.rb, line 20
20: def close
21: client.channel = self
22: client.send_frame(
23: Qrack::Protocol::Channel::Close.new(:reply_code => 200, :reply_text => 'bye', :method_id => 0, :class_id => 0)
24: )
25:
26: method = client.next_method
27:
28: client.check_response(method, Qrack::Protocol::Channel::CloseOk, "Error closing channel #{number}")
29:
30: @active = false
31: :close_ok
32: end
# File lib/bunny/channel08.rb, line 8
8: def open
9: client.channel = self
10: client.send_frame(Qrack::Protocol::Channel::Open.new)
11:
12: method = client.next_method
13:
14: client.check_response(method, Qrack::Protocol::Channel::OpenOk, "Cannot open channel #{number}")
15:
16: @active = true
17: :open_ok
18: end