Visual FoxPro
Visual FoxPro
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 FoxPro Downloads
LOCAL lnSuccess
LOCAL loSocket
LOCAL lnBTls
LOCAL lnMaxWaitMs
LOCAL lnBRcvPerf
lnSuccess = 0
loSocket = CreateObject('Chilkat.Socket')
* Connect to the server using TLS.
lnBTls = 1
lnMaxWaitMs = 5000
lnSuccess = loSocket.Connect("example.com",5000,lnBTls,lnMaxWaitMs)
IF (lnSuccess = 0) THEN
? loSocket.LastErrorText
RELEASE loSocket
CANCEL
ENDIF
* Restart one direction of transfer-rate measurement. Pass 1 to reset the receive measurement
* (RcvBytesPerSec) or 0 to reset the send measurement (SendBytesPerSec).
lnBRcvPerf = 1
loSocket.ResetPerf(lnBRcvPerf)
? "Receive-rate measurement restarted."
RELEASE loSocket