Visual Basic 6.0
Visual Basic 6.0
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 Visual Basic 6.0 Downloads
Dim success As Long
success = 0
Dim socket As New ChilkatSocket
' Connect to the server using TLS.
Dim bTls As Long
bTls = 1
Dim maxWaitMs As Long
maxWaitMs = 5000
success = socket.Connect("example.com",5000,bTls,maxWaitMs)
If (success = 0) Then
Debug.Print socket.LastErrorText
Exit Sub
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 Long
bRcvPerf = 1
socket.ResetPerf bRcvPerf
Debug.Print "Receive-rate measurement restarted."