--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Attempts to establish an SFTP connection over the SSH session given when this object was instantiated. If the object is already open, this will simply execute the given block (if any), passing the SFTP session itself as argument. If the session is currently being opened, this will add the given block to the list of callbacks, to be executed when the session is fully open.
- !ruby/struct:SM::Flow::P 
  body: "This method does not block, and will return immediately. If you pass a block to it, that block will be invoked when the connection has been fully established. Thus, you can do something like this:"
- !ruby/struct:SM::Flow::VERB 
  body: "  sftp.connect do\n    puts &quot;open!&quot;\n  end\n"
- !ruby/struct:SM::Flow::P 
  body: "If you just want to block until the connection is ready, see the #connect! method."
full_name: Net::SFTP::Session#connect
is_singleton: false
name: connect
params: (&block)
visibility: public
