Classic ASP
Classic ASP
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 Classic ASP Downloads
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
success = 0
set socket = Server.CreateObject("Chilkat.Socket")
' Connect to the server using TLS.
bTls = 1
maxWaitMs = 5000
success = socket.Connect("example.com",5000,bTls,maxWaitMs)
If (success = 0) Then
Response.Write "<pre>" & Server.HTMLEncode( socket.LastErrorText) & "</pre>"
Response.End
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).
bRcvPerf = 1
socket.ResetPerf bRcvPerf
Response.Write "<pre>" & Server.HTMLEncode( "Receive-rate measurement restarted.") & "</pre>"
%>
</body>
</html>