Class: HrrRbSftp::Protocol::Version1::Packets::Packet
- Inherits:
-
Common::Packets::Packet
- Object
- Common::Packets::Packet
- HrrRbSftp::Protocol::Version1::Packets::Packet
- Defined in:
- lib/hrr_rb_sftp/protocol/version1/packets/packet.rb
Overview
This class implements base packet operations and is to be inherited by each packet class.
Direct Known Subclasses
SSH_FXP_ATTRS, SSH_FXP_CLOSE, SSH_FXP_DATA, SSH_FXP_FSETSTAT, SSH_FXP_FSTAT, SSH_FXP_HANDLE, SSH_FXP_LSTAT, SSH_FXP_MKDIR, SSH_FXP_NAME, SSH_FXP_OPEN, SSH_FXP_OPENDIR, SSH_FXP_READ, SSH_FXP_READDIR, SSH_FXP_REALPATH, SSH_FXP_REMOVE, SSH_FXP_RMDIR, SSH_FXP_SETSTAT, SSH_FXP_STAT, SSH_FXP_STATUS, SSH_FXP_WRITE
Instance Attribute Summary
Attributes included from Loggable
Instance Method Summary collapse
-
#context ⇒ Hash
Returns contextual variables.
-
#handles ⇒ Hash{String=>File, Dir}
Returns opened handles.
-
#initialize(context, logger: nil) ⇒ Packet
constructor
Returns a new instance of a class that includes this module.
-
#version ⇒ Integer
Returns Negotiated protocol version.
Methods inherited from Common::Packets::Packet
Methods included from Loggable
#log_debug, #log_error, #log_fatal, #log_info, #log_warn
Constructor Details
#initialize(context, logger: nil) ⇒ Packet
Returns a new instance of a class that includes this module.
19 20 21 22 23 |
# File 'lib/hrr_rb_sftp/protocol/version1/packets/packet.rb', line 19 def initialize context, logger: nil super logger: logger @context = context end |
Instance Method Details
#context ⇒ Hash
Returns contextual variables.
32 33 34 |
# File 'lib/hrr_rb_sftp/protocol/version1/packets/packet.rb', line 32 def context @context end |
#handles ⇒ Hash{String=>File, Dir}
Returns opened handles.
50 51 52 |
# File 'lib/hrr_rb_sftp/protocol/version1/packets/packet.rb', line 50 def handles @context[:handles] end |
#version ⇒ Integer
Returns Negotiated protocol version.
41 42 43 |
# File 'lib/hrr_rb_sftp/protocol/version1/packets/packet.rb', line 41 def version @context[:version] end |