Class | Net::SSH::Connection::Channel |
In: |
lib/net/ssh/connection/channel.rb
|
Parent: | Object |
VALID_PTY_OPTIONS | = | { :term=>"xterm", :chars_wide=>80, :chars_high=>24, :pixels_wide=>640, :pixels_high=>480, :modes=>{}, :want_reply=>false } |
connection | [R] | The connection driver instance that owns this channel |
local_id | [R] | The channel’s local id (assigned by the connection) |
local_maximum_packet_size | [R] | The maximum packet size that may be sent over this channel |
local_window_size | [R] | The maximum data window size for this channel |
maximum_packet_size | [R] | The maximum packet size that may be sent over this channel |
remote_id | [R] | The channel’s remote id (assigned by the remote server) |
type | [R] | The type of this channel |
window_size | [R] | The maximum data window size for this channel |
Creates a new channel object with the given internal information. The channel is assumed to already be connected to a remote host.
Requests that a new channel be opened on the remote host. This will return immediately, but the on_confirm_open callback will be invoked when the remote host confirms that the channel has been successfully opened.
Invoked when the server sends a data packet. This in turn calls the "on_data" callback.
Invoked when the server sends an extended data packet. This in turn calls the "on_extended_data" callback.
Invoked when the server asks to adjust the window size. This in turn calls the "on_window_adjust" callback.
Execute the given remote command over the channel. This should be invoked in the "on_confirm" callback of a channel. This method will return immediately.
Request that a pty be opened for this channel. Valid options are :term, :chars_wide, :chars_high, :pixels_wide, :pixels_high, :modes, and :want_reply. :modes is a Hash, where the keys are constants from Net::SSH::Service::Term, and values are integers describing the corresponding key.
Send a data packet to the server, over the channel. Only sends as much of that data as the channel is currently capable of sending (based on window size and maximum packet size), and returns any data that could not be sent. Returns nil if all the data that was requested to be sent, was sent.
Send an EOF across the channel. No data should be sent from the client to the server over this channel after this, although packets may still be received from the server.
Send an extended data packet to the server, over the channel. Extended data always has a numeric type associated with it. The only predefined type is 1, whic corresponds to stderr data.
Send an extended data packet to the server, over the channel. Extended data always has a numeric type associated with it. The only predefined type is 1, whic corresponds to stderr data.
Send a generic channel request with the given name. The data item will be written directly into the request (after converting it to a string, as necessary).
Send a channel request with the given name. It will have one data item, which will be interpreted as a string.
Send the given signal to process on the other side of the channel. The parameter should be one of the Channel::SIGxxx constants.
Send a "window adjust" message to the server for this channel, informing it that it may send this many more bytes over the channel.