| Visual Basic (Declaration) | |
|---|---|
Public Overloads Sub BeginGet( _ ByVal lines As Integer, _ ByVal state As Object _ ) | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As PopMessage Dim lines As Integer Dim state As Object instance.BeginGet(lines, state) | |
Parameters
- lines
- The amount of lines of the message to get.
- state
- User state information.
Return Value
An IAsyncResult that represents the asynchronous operation, which could still be pending.This method begins to asynchronously get the amount of lines (specified by lines) from a message from the server. Upon completion of the method, the Pop.EndGet event will be raised. A PopEventArgs object will be passed into the Pop.EndGet event, providing data about the message retrieved. For example, the message itself is accessible in PopEventArgs.PopMessage.Message, which will be a MessageStream object. The MessageStream object provides flexibility and functionality in accessing the message. For example, message header lines, message text, and message attachments are all available as collections of the MessageStream object. The MessageStream object also provides decoding of MIME parts "on the fly".
If you use this method to retrieve a partial message, PopMessage.Complete will be false because the entire message is not retrieved.
For more information about using events, see Using Events In PowerTCP.
The parameter state is useful for any kind of data you would like accessible in the Pop.EndGet event.
To perform this operation synchronously, use the PopMessage.Get method.
Target Platforms: Microsoft .NET Framework 2.0