Begins asynchronous GetDownloadStream operation.
Returns a Stream for reading data from the remote file.
Namespace:
Rebex.Net
Assembly:
Rebex.Ftp (in Rebex.Ftp.dll)
Syntax
Visual Basic |
---|
Public Function BeginGetDownloadStream ( _ remotePath As String, _ origin As SeekOrigin, _ offset As Long, _ callback As AsyncCallback, _ state As Object _ ) As IAsyncResult |
C# |
---|
public IAsyncResult BeginGetDownloadStream( string remotePath, SeekOrigin origin, long offset, AsyncCallback callback, Object state ) |
Parameters
- remotePath
- Type: System..::..String
The path of the remote file.
- origin
- Type: System.IO..::..SeekOrigin
Position indicator that is used to obtain new position within the stream.
- offset
- Type: System..::..Int64
A byte offset relative to the origin parameter.
- callback
- Type: System..::..AsyncCallback
An optional asynchronous callback to be called when the operation is complete.
- state
- Type: System..::..Object
A user-provided object that identifies this particular asynchronous operation.
Return Value
An IAsyncResult that references the asynchronous operation.Remarks
Because the FTP protocol does not support processing multiple commands or transfers at the same time, the stream has to be closed before any other FTP operation can be used.
In builds for .NET 4.0 and higher, this method is available as an extension method. Add 'using Rebex.Legacy' (C#) or 'Import Rebex.Legacy' (VB.NET) to your code in order to use it.