Begins asynchronous SendCommand operation.
Executes a command on the IMAP server.
Namespace:
Rebex.Net
Assembly:
Rebex.Imap (in Rebex.Imap.dll)
Syntax
Visual Basic |
---|
Public Function BeginSendCommand ( _ command As String, _ parameters As Object(), _ callback As AsyncCallback, _ state As Object _ ) As IAsyncResult |
C# |
---|
public IAsyncResult BeginSendCommand( string command, Object[] parameters, AsyncCallback callback, Object state ) |
Parameters
- command
- Type: System..::..String
Command (e.g. "CAPABILITY").
- parameters
- Type: array<System..::..Object>[]()[][]
List of parameters. Allowed types are String and a byte array.
- 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
The specified string parameters are send as is. It is caller's responsibility to properly format the parameters.
The specified byte array parameters are send as literals - binary blocks of data.
To use this method properly, some understanding of the IMAP protocol is strongly recommended.
A call to SendCommand MUST be followed by a call to ReadResponse method.
Use ReadResponse and SendCommand to implement various custom commands.
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.