class Net::SSH::Test::Script
def sends_channel_request(channel, request, reply, data, success=true)
This will typically be called via Net::SSH::Test::Channel#sends_exec or
if +success+ is true, or :channel_failure if +success+ is false.
If a reply is desired, a remote packet will also be queued, :channel_success
data.
success or failure. If +data+ is an array it will be treated as multiple
+success+ indicates whether the response (if one is required) should be
is any additional request-specific data that this packet should send.
indicating whether a response to this packet is required , and +data+
is a string naming the request type to send, +reply+ is a boolean
+channel+ should be an instance of Net::SSH::Test::Channel. +request+
Scripts the sending of a new channel request packet to the remote host.
def sends_channel_request(channel, request, reply, data, success=true) if data.is_a? Array events << LocalPacket.new(:channel_request, channel.remote_id, request, reply, *data) else events << LocalPacket.new(:channel_request, channel.remote_id, request, reply, data) end if reply if success events << RemotePacket.new(:channel_success, channel.local_id) else events << RemotePacket.new(:channel_failure, channel.local_id) end end end