module Rex::Post::Meterpreter::ChannelContainer
This interface is meant to be included by things that are meant to contain zero or more channel instances in the form of a hash.
Attributes
channels[R]
The hash of channels.
Public Instance Methods
add_channel(channel)
click to toggle source
Adds a channel to the container that is indexed by its channel identifier
# File lib/rex/post/meterpreter/channel_container.rb, line 24 def add_channel(channel) self.channels[channel.cid] = channel end
find_channel(cid)
click to toggle source
Looks up a channel instance based on its channel identifier
# File lib/rex/post/meterpreter/channel_container.rb, line 31 def find_channel(cid) return self.channels[cid] end
initialize_channels()
click to toggle source
Initializes the channel association hash
# File lib/rex/post/meterpreter/channel_container.rb, line 17 def initialize_channels self.channels = {} end
remove_channel(cid)
click to toggle source
Removes a channel based on its channel identifier
# File lib/rex/post/meterpreter/channel_container.rb, line 38 def remove_channel(cid) return self.channels.delete(cid) end