class Net::SSH::Connection::Session
def global_request(packet)
request callback will be invoked, if one exists, and the necessary
Invoked when a global request is received. The registered global
def global_request(packet) info { "global request received: #{packet[:request_type]} #{packet[:want_reply]}" } callback = @on_global_request[packet[:request_type]] result = callback ? callback.call(packet[:request_data], packet[:want_reply]) : false if result != :sent && result != true && result != false raise "expected global request handler for `#{packet[:request_type]}' to return true, false, or :sent, but got #{result.inspect}" end if packet[:want_reply] && result != :sent msg = Buffer.from(:byte, result ? REQUEST_SUCCESS : REQUEST_FAILURE) send_message(msg) end end