Lianja
Lianja
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 Lianja Downloads
llSuccess = .F.
loSocket = createobject("CkSocket")
// Connect to the server using TLS.
llBTls = .T.
lnMaxWaitMs = 5000
llSuccess = loSocket.Connect("example.com",5000,llBTls,lnMaxWaitMs)
if (llSuccess = .F.) then
? loSocket.LastErrorText
release loSocket
return
endif
// Restart one direction of transfer-rate measurement. Pass .T. to reset the receive measurement
// (RcvBytesPerSec) or .F. to reset the send measurement (SendBytesPerSec).
llBRcvPerf = .T.
loSocket.ResetPerf(llBRcvPerf)
? "Receive-rate measurement restarted."
release loSocket