System.Net.FtpWebRequest.BeginGetRequestStream Method

Begins asynchronously opening a request's content stream for writing.

Syntax

public override IAsyncResult BeginGetRequestStream (AsyncCallback callback, object state)

Parameters

callback
An AsyncCallback delegate that references the method to invoke when the operation is complete.
state
A user-defined object that contains information about the operation. This object is passed to the callback delegate when the operation completes.

Returns

An IAsyncResult instance that indicates the status of the operation.

Remarks

You must complete the asynchronous operation by calling the FtpWebRequest.EndGetRequestStream(IAsyncResult) method. Typically, FtpWebRequest.EndGetRequestStream(IAsyncResult) is called by the method referenced by callback. To determine the state of the operation, check the properties in the IAsyncResult object returned by this method.

This method does not block while waiting for the stream. To block, call FtpWebRequest.GetRequestStream in place of this method.

For detailed information about using the asynchronous programming model, see [<topic://cpovrAsynchronousProgrammingOverview>].

Note:

This member outputs trace information when you enable network tracing in your application. For more information, see [<topic://conUsingNetworkTracing>].

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0