Sample code for 30+ languages & platforms
Xojo Plugin

Restart Transfer-Rate Measurement

See more Socket/SSL/TLS Examples

Demonstrates Socket.ResetPerf, which restarts one direction of connection-level transfer-rate measurement.

Background. Pass true to reset the receive measurement (RcvBytesPerSec) or false to reset the send measurement (SendBytesPerSec).

Chilkat Xojo Plugin Downloads

Xojo Plugin
Dim success As Boolean
success = False

Dim socket As New Chilkat.Socket

//  Connect to the server using TLS.
Dim bTls As Boolean
bTls = True
Dim maxWaitMs As Int32
maxWaitMs = 5000
success = socket.Connect("example.com",5000,bTls,maxWaitMs)
If (success = False) Then
    System.DebugLog(socket.LastErrorText)
    Return
End If

//  Restart one direction of transfer-rate measurement.  Pass 1 to reset the receive measurement
//  (RcvBytesPerSec) or 0 to reset the send measurement (SendBytesPerSec).
Dim bRcvPerf As Boolean
bRcvPerf = True
socket.ResetPerf bRcvPerf
System.DebugLog("Receive-rate measurement restarted.")