Class: WinRM::PSRP::Fragment
- Inherits:
-
Object
- Object
- WinRM::PSRP::Fragment
- Defined in:
- lib/winrm/psrp/fragment.rb
Overview
PowerShell Remoting Protocol message fragment.
Instance Attribute Summary collapse
-
#blob ⇒ Object
readonly
Returns the value of attribute blob.
-
#end_fragment ⇒ Object
readonly
Returns the value of attribute end_fragment.
-
#fragment_id ⇒ Object
readonly
Returns the value of attribute fragment_id.
-
#object_id ⇒ Object
readonly
Returns the value of attribute object_id.
-
#start_fragment ⇒ Object
readonly
Returns the value of attribute start_fragment.
Instance Method Summary collapse
-
#bytes ⇒ Array<Byte>
Returns the raw PSRP message bytes ready for transfer to Windows inside a WinRM message.
-
#initialize(object_id, blob, fragment_id = 0, start_fragment = true, end_fragment = true) ⇒ Fragment
constructor
Creates a new PSRP message fragment.
Constructor Details
#initialize(object_id, blob, fragment_id = 0, start_fragment = true, end_fragment = true) ⇒ Fragment
Creates a new PSRP message fragment
29 30 31 32 33 34 35 |
# File 'lib/winrm/psrp/fragment.rb', line 29 def initialize(object_id, blob, fragment_id = 0, start_fragment = true, end_fragment = true) @object_id = object_id @blob = blob @fragment_id = fragment_id @start_fragment = start_fragment @end_fragment = end_fragment end |
Instance Attribute Details
#blob ⇒ Object (readonly)
Returns the value of attribute blob.
37 38 39 |
# File 'lib/winrm/psrp/fragment.rb', line 37 def blob @blob end |
#end_fragment ⇒ Object (readonly)
Returns the value of attribute end_fragment.
37 38 39 |
# File 'lib/winrm/psrp/fragment.rb', line 37 def end_fragment @end_fragment end |
#fragment_id ⇒ Object (readonly)
Returns the value of attribute fragment_id.
37 38 39 |
# File 'lib/winrm/psrp/fragment.rb', line 37 def fragment_id @fragment_id end |
#object_id ⇒ Object (readonly)
Returns the value of attribute object_id.
37 38 39 |
# File 'lib/winrm/psrp/fragment.rb', line 37 def object_id @object_id end |
#start_fragment ⇒ Object (readonly)
Returns the value of attribute start_fragment.
37 38 39 |
# File 'lib/winrm/psrp/fragment.rb', line 37 def start_fragment @start_fragment end |
Instance Method Details
#bytes ⇒ Array<Byte>
Returns the raw PSRP message bytes ready for transfer to Windows inside a WinRM message.
42 43 44 45 46 47 48 49 50 |
# File 'lib/winrm/psrp/fragment.rb', line 42 def bytes [ int64be(object_id), int64be(fragment_id), end_start_fragment, int16be(blob.length), blob ].flatten end |