B4X
B4X
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 B4X Downloads
Dim success As Boolean = False
Dim socket As ChilkatSocket
socket.Initialize("socket")
' Connect to the server using TLS.
Dim bTls As Boolean = True
Dim maxWaitMs As Int = 5000
success = socket.Connect("example.com", 5000, bTls, maxWaitMs)
If success = False Then
Log(socket.LastErrorText)
Return
End If
' Restart one direction of transfer-rate measurement. Pass True to reset the receive measurement
' (RcvBytesPerSec) or False to reset the send measurement (SendBytesPerSec).
Dim bRcvPerf As Boolean = True
socket.ResetPerf(bRcvPerf)
Log("Receive-rate measurement restarted.")