Class | Net::SSH::Multi::PendingConnection |
In: |
lib/net/ssh/multi/pending_connection.rb
|
Parent: | Object |
A PendingConnection instance mimics a Net::SSH::Connection::Session instance, without actually being an open connection to a server. It is used by Net::SSH::Multi::Session when a concurrent connection limit is in effect, so that a server can hang on to a "connection" that isn‘t really a connection.
Any requests against this connection (like open_channel or send_global_request) are not actually sent, but are added to a list of recordings. When the real session is opened and replaces this pending connection, all recorded actions will be replayed against that session.
You‘ll never need to initialize one of these directly, and (if all goes well!) should never even notice that one of these is in use. Net::SSH::Multi::Session will instantiate these as needed, and only when there is a concurrent connection limit.
server | [R] | The Net::SSH::Multi::Server object that "owns" this pending connection. |
Always returns true, so that the pending connection looks active until it can be truly opened and replaced with a real connection.
Records that a channel open request has been made, and returns a new Net::SSH::Multi::ChannelProxy object to represent the (as yet unopened) channel.
Instructs the pending session to replay all of its recordings against the given session, and to then replace itself with the given session.
Records that a global request has been made. The request is not actually sent, and won‘t be until replace_with is called.