edtFTPnet/PRO - Secure FTP component for .NET | Free Trial | Pricing
Click or drag to resize

ExFTPConnectionBeginClose Method (Boolean, AsyncCallback, Object)

Begins an asynchronous request to close the FTP connection.

Namespace:  EnterpriseDT.Net.Ftp
Assembly:  edtFTPnetPRO (in edtFTPnetPRO.dll) Version: 12.3.0.0
Syntax
public virtual IAsyncResult BeginClose(
	bool abruptClose,
	AsyncCallback callback,
	Object state
)

Parameters

abruptClose
Type: SystemBoolean
Closes session abruptly (see comments).
callback
Type: SystemAsyncCallback
The AsyncCallback delegate.
state
Type: SystemObject
An object that contains state information for this request.

Return Value

Type: IAsyncResult
An FTPTask that references the asynchronous closure.
Remarks

If abruptClose is true then the session will be closed immediately by closing the control socket without sending the QUIT command, otherwise the session will be closed by sending a QUIT command before closing the socket.

You can create a callback method that implements the AsyncCallback delegate and pass its name to the BeginClose method. The state argument may be used to pass in data that will be passed to the callback method.

For more information please refer to the synchronous version of this method, Close.

See Also