Xbase++
Xbase++
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 Xbase++ Downloads
LOCAL nSuccess
LOCAL oSocket
LOCAL nBTls
LOCAL nMaxWaitMs
LOCAL nBRcvPerf
nSuccess := 0
oSocket := CreateObject("Chilkat.Socket")
// Connect to the server using TLS.
nBTls := 1
nMaxWaitMs := 5000
nSuccess := oSocket:Connect("example.com", 5000, nBTls, nMaxWaitMs)
IF (nSuccess == 0)
? oSocket:LastErrorText
oSocket:destroy()
RETURN
ENDIF
// Restart one direction of transfer-rate measurement. Pass 1 to reset the receive measurement
// (RcvBytesPerSec) or 0 to reset the send measurement (SendBytesPerSec).
nBRcvPerf := 1
oSocket:ResetPerf(nBRcvPerf)
? "Receive-rate measurement restarted."
oSocket:destroy()