GetLastReceivedDataChunk Method
Gets the last received data block of the server's response as a string.
Typically, you'll use this method in OnReceiveProgress event handler to monitor the data being received during the connection. Typically, 5-60KB data portion is returned per call. For instance, if you're downloading 1MB e-mail, OnReceiveProgress event will fire about 30-200 times as the overall data is split in 30-200 chunks.
The method should be called once per a single triggering of OnReceiveProgress event.
strData = ObjectName.GetLastReceivedDataChunk() |
Parameters: | None | |
Return value As String | Data portion received with the last read data operation. |
Usage example:
Option Explicit Dim WithEvents objPOP3 As MailBee.POP3 Private Sub Form_Load() Dim Msg As MailBee.Message Set objPOP3 = New MailBee.POP3 objPOP3.LicenseKey = "put your license key here" objPOP3.EnableEvents = True If objPOP3.Connect ("mailserver.com", 110, "MyName", "MyPassword") Then If objPOP3.MessageCount > 0 Then Set Msg = objPOP3.RetrieveSingleMessage(1) End If objPOP3.Disconnect End If End Sub Private Sub objPOP3_OnReceiveProgress(ByVal Index As Long, ByVal TotalBytesReceived As Long, Proceed As Boolean) Debug.Print objPOP3.GetLastReceivedDataChunk End Sub
See Also:
Copyright © 2002-2024, AfterLogic Corporation. All rights reserved.