Class: WinRM::PSRP::Fragment
- Inherits:
-
Object
- Object
- WinRM::PSRP::Fragment
- Defined in:
- lib/chef-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.
-
#psrp_object_id ⇒ Object
readonly
Returns the value of attribute psrp_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(psrp_object_id, blob, fragment_id = 0, start_fragment = true, end_fragment = true) ⇒ Fragment
constructor
Creates a new PSRP message fragment.
Constructor Details
#initialize(psrp_object_id, blob, fragment_id = 0, start_fragment = true, end_fragment = true) ⇒ Fragment
Creates a new PSRP message fragment
30 31 32 33 34 35 36 |
# File 'lib/chef-winrm/psrp/fragment.rb', line 30 def initialize(psrp_object_id, blob, fragment_id = 0, start_fragment = true, end_fragment = true) @psrp_object_id = psrp_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.
22 23 24 |
# File 'lib/chef-winrm/psrp/fragment.rb', line 22 def blob @blob end |
#end_fragment ⇒ Object (readonly)
Returns the value of attribute end_fragment.
22 23 24 |
# File 'lib/chef-winrm/psrp/fragment.rb', line 22 def end_fragment @end_fragment end |
#fragment_id ⇒ Object (readonly)
Returns the value of attribute fragment_id.
22 23 24 |
# File 'lib/chef-winrm/psrp/fragment.rb', line 22 def fragment_id @fragment_id end |
#psrp_object_id ⇒ Object (readonly)
Returns the value of attribute psrp_object_id.
22 23 24 |
# File 'lib/chef-winrm/psrp/fragment.rb', line 22 def psrp_object_id @psrp_object_id end |
#start_fragment ⇒ Object (readonly)
Returns the value of attribute start_fragment.
22 23 24 |
# File 'lib/chef-winrm/psrp/fragment.rb', line 22 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.
41 42 43 44 45 46 47 48 49 |
# File 'lib/chef-winrm/psrp/fragment.rb', line 41 def bytes [ int64be(psrp_object_id), int64be(fragment_id), end_start_fragment, int16be(blob.length), blob, ].flatten end |