Methods
Classes and Modules
Module Net::SFTP::Protocol::Constants
Module Net::SFTP::Protocol::V_01
Module Net::SFTP::Protocol::V_02
Module Net::SFTP::Protocol::V_03
Module Net::SFTP::Protocol::V_04
Module Net::SFTP::Protocol::V_05
Class Net::SFTP::Protocol::Driver
Class Net::SFTP::Protocol::PacketAssistant
Public Instance methods
register_services( container )
    # File lib/net/sftp/protocol/services.rb, line 19
19:   def register_services( container )
20:     container.namespace_define :protocol do |ns|
21: 
22:       # The maximum version of the SFTP protocol supported by this
23:       # implementation. Clients may set this to a lower value to force the
24:       # usage of a specific SFTP version. It should _not_ be set higher than
25:       # the value that is given below.
26:       ns.version { 5 }
27: 
28:       # A proc object that, when invoked, returns a dispatcher object capable
29:       # of handling the requested protocol version.
30:       ns.dispatcher_factory do |c,|
31:         lambda do |version, extensions|
32:           version = "%02d" % version
33:           c.require "net/sftp/protocol/#{version}/services",
34:             "#{self}::V_#{version}"
35:           impl = c["v_#{version}".to_sym][:impl]
36:           impl.extensions = extensions
37:           impl
38:         end
39:       end
40: 
41:       # The driver service that manages the SFTP protocol-level communications
42:       ns.driver do |c,p|
43:         require 'net/sftp/protocol/driver'
44:         Driver.new( c[:connection][:driver],
45:                     c[:transport][:buffers],
46:                     c[:version],
47:                     c[:dispatcher_factory],
48:                     c[:log_for, p] )
49:       end
50: 
51:     end
52:   end