Class: Ftpd::Session
- Inherits:
-
Object
- Object
- Ftpd::Session
- Defined in:
- lib/ftpd/session.rb
Instance Attribute Summary collapse
-
#command_sequence_checker ⇒ Object
Returns the value of attribute command_sequence_checker.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#data_channel_protection_level ⇒ Object
Returns the value of attribute data_channel_protection_level.
-
#data_hostname ⇒ Object
readonly
Returns the value of attribute data_hostname.
-
#data_port ⇒ Object
readonly
Returns the value of attribute data_port.
-
#data_server ⇒ Object
Returns the value of attribute data_server.
-
#data_type ⇒ Object
Returns the value of attribute data_type.
-
#epsv_all ⇒ Object
writeonly
Sets the attribute epsv_all.
-
#file_system ⇒ Object
readonly
Returns the value of attribute file_system.
-
#logged_in ⇒ Object
Returns the value of attribute logged_in.
-
#mode ⇒ Object
writeonly
Sets the attribute mode.
-
#name_prefix ⇒ Object
Returns the value of attribute name_prefix.
-
#protection_buffer_size_set ⇒ Object
Returns the value of attribute protection_buffer_size_set.
-
#socket ⇒ Object
Returns the value of attribute socket.
-
#structure ⇒ Object
writeonly
Sets the attribute structure.
Instance Method Summary collapse
-
#initialize(session_config, socket) ⇒ Session
constructor
A new instance of Session.
- #run ⇒ Object
Methods included from ListPath
Methods included from Error
#error, #sequence_error, #syntax_error, #unimplemented_error
Constructor Details
#initialize(session_config, socket) ⇒ Session
Returns a new instance of Session.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/ftpd/session.rb', line 26 def initialize(session_config, socket) @config = session_config @socket = socket if @config.tls == :implicit @socket.encrypt end @command_sequence_checker = init_command_sequence_checker @protocols = Protocols.new(@socket) @command_handlers = CommandHandlers.new @command_loop = CommandLoop.new(self) register_commands initialize_session end |
Instance Attribute Details
#command_sequence_checker ⇒ Object
Returns the value of attribute command_sequence_checker.
7 8 9 |
# File 'lib/ftpd/session.rb', line 7 def command_sequence_checker @command_sequence_checker end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
15 16 17 |
# File 'lib/ftpd/session.rb', line 15 def config @config end |
#data_channel_protection_level ⇒ Object
Returns the value of attribute data_channel_protection_level.
8 9 10 |
# File 'lib/ftpd/session.rb', line 8 def data_channel_protection_level @data_channel_protection_level end |
#data_hostname ⇒ Object (readonly)
Returns the value of attribute data_hostname.
16 17 18 |
# File 'lib/ftpd/session.rb', line 16 def data_hostname @data_hostname end |
#data_port ⇒ Object (readonly)
Returns the value of attribute data_port.
17 18 19 |
# File 'lib/ftpd/session.rb', line 17 def data_port @data_port end |
#data_server ⇒ Object
Returns the value of attribute data_server.
9 10 11 |
# File 'lib/ftpd/session.rb', line 9 def data_server @data_server end |
#data_type ⇒ Object
Returns the value of attribute data_type.
10 11 12 |
# File 'lib/ftpd/session.rb', line 10 def data_type @data_type end |
#epsv_all=(value) ⇒ Object (writeonly)
Sets the attribute epsv_all
19 20 21 |
# File 'lib/ftpd/session.rb', line 19 def epsv_all=(value) @epsv_all = value end |
#file_system ⇒ Object (readonly)
Returns the value of attribute file_system.
18 19 20 |
# File 'lib/ftpd/session.rb', line 18 def file_system @file_system end |
#logged_in ⇒ Object
Returns the value of attribute logged_in.
11 12 13 |
# File 'lib/ftpd/session.rb', line 11 def logged_in @logged_in end |
#mode=(value) ⇒ Object (writeonly)
Sets the attribute mode
20 21 22 |
# File 'lib/ftpd/session.rb', line 20 def mode=(value) @mode = value end |
#name_prefix ⇒ Object
Returns the value of attribute name_prefix.
12 13 14 |
# File 'lib/ftpd/session.rb', line 12 def name_prefix @name_prefix end |
#protection_buffer_size_set ⇒ Object
Returns the value of attribute protection_buffer_size_set.
13 14 15 |
# File 'lib/ftpd/session.rb', line 13 def protection_buffer_size_set @protection_buffer_size_set end |
#socket ⇒ Object
Returns the value of attribute socket.
14 15 16 |
# File 'lib/ftpd/session.rb', line 14 def socket @socket end |
#structure=(value) ⇒ Object (writeonly)
Sets the attribute structure
21 22 23 |
# File 'lib/ftpd/session.rb', line 21 def structure=(value) @structure = value end |
Instance Method Details
#run ⇒ Object
41 42 43 |
# File 'lib/ftpd/session.rb', line 41 def run @command_loop.read_and_execute_commands end |