Xceed .NET Libraries Documentation
Xceed.SSH.Client Assembly / Xceed.SSH.Client Namespace / SFtpPacketInputStream Class


In This Topic
    SFtpPacketInputStream Class
    In This Topic
    This class implements a read-only stream that receives synchronously ChannelData payloads from a specified channel from a specified SSHPacketIOManager. It presents the data from the payloads as a continuous data stream. That way, SFtp packets can be read and interpreted seamlessly.
    Syntax
    'Declaration
     
    
    Public Class SFtpPacketInputStream 
       Inherits System.IO.Stream
       Implements System.IDisposable 
    'Usage
     
    
    Dim instance As SFtpPacketInputStream
    public class SFtpPacketInputStream : System.IO.Stream, System.IDisposable  
    Remarks
    This approach is needed because we can't assume that each ChannelData payload represents a complete SFtp packet. The packet might be spread out over several SSH payloads. Having this stream allows a packet processor to read and form SFtp packets without knowing about the data being SSH packets. Typically, the SSHPacketIOManager supplied to the class will be the real manager that reads data from the wire. This class is somewhat thread-safe. It protects the buffer list. But it doesn't protect the call to receive data from the packet manager. The way the class is used right now. It doesn't need to be thread safe. The locks could be removed if a speed gain is needed. The class is currently used as part of the SFtpPacketIOManager read thread. As such, only one thread runs this class' code.
    Inheritance Hierarchy

    System.Object
       System.MarshalByRefObject
          System.IO.Stream
             Xceed.SSH.Client.SFtpPacketInputStream

    Public Constructors
    Protected Fields
    Public Properties
     NameDescription
    Public PropertyOverridden. When overridden in a derived class, gets a value indicating whether the current stream supports reading.  
    Public PropertyOverridden. When overridden in a derived class, gets a value indicating whether the current stream supports seeking.  
    Public Property (Inherited from System.IO.Stream)
    Public PropertyOverridden. When overridden in a derived class, gets a value indicating whether the current stream supports writing.  
    Public PropertyOverridden. When overridden in a derived class, gets the length in bytes of the stream.  
    Public PropertyOverridden. When overridden in a derived class, gets or sets the position within the current stream.  
    Public Property (Inherited from System.IO.Stream)
    Public Property (Inherited from System.IO.Stream)
    Top
    Public Methods
     NameDescription
    Public Method (Inherited from System.IO.Stream)
    Public Method (Inherited from System.IO.Stream)
    Public MethodOverridden. Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream. Instead of calling this method, ensure that the stream is properly disposed.  
    Public MethodOverloaded.  (Inherited from System.IO.Stream)
    Public MethodOverloaded.  (Inherited from System.IO.Stream)
    Public Method (Inherited from System.MarshalByRefObject)
    Public MethodOverloaded.  (Inherited from System.IO.Stream)
    Public Method (Inherited from System.IO.Stream)
    Public Method (Inherited from System.IO.Stream)
    Public MethodOverridden. When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device.  
    Public MethodOverloaded.  (Inherited from System.IO.Stream)
    Public Method (Inherited from System.MarshalByRefObject)
    Public Method (Inherited from System.MarshalByRefObject)
    Public MethodOverridden. When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.  
    Public MethodOverloaded.  (Inherited from System.IO.Stream)
    Public Method (Inherited from System.IO.Stream)
    Public MethodOverridden. When overridden in a derived class, sets the position within the current stream.  
    Public MethodOverridden. When overridden in a derived class, sets the length of the current stream.  
    Public MethodOverridden. When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.  
    Public MethodOverloaded.  (Inherited from System.IO.Stream)
    Public Method (Inherited from System.IO.Stream)
    Top
    Protected Methods
     NameDescription
    Protected Method (Inherited from System.IO.Stream)
    Protected MethodOverloaded.  (Inherited from System.MarshalByRefObject)
    Protected Method (Inherited from System.IO.Stream)
    Top
    Supported Frameworks

    .NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.

    .NET Standard: netstandard2.0, netstandard2.1

    .NET Framework: net20, net35, net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.

    See Also