Треба получить sent\recieved и продолжительность соединения.
Работать должно в 98\ME\2000\XP
Спасибо.
MEMBER писал(а):Ой, а что это мне за статус прилепили, ась? Какой-такой Гугль?
Private Const MIB_TCP_RTO_OTHER As Long = 1
Private Const MIB_TCP_RTO_CONSTANT As Long = 2
Private Const MIB_TCP_RTO_RSRE As Long = 3
Private Const MIB_TCP_RTO_VANJ As Long = 4
Private Type MIB_TCPSTATS
dwRtoAlgorithm As Long
dwRtoMin As Long
dwRtoMax As Long
dwMaxConn As Long
dwActiveOpens As Long
dwPassiveOpens As Long
dwAttemptFails As Long
dwEstabResets As Long
dwCurrEstab As Long
dwInSegs As Long
dwOutSegs As Long
dwRetransSegs As Long
dwInErrs As Long
dwOutRsts As Long
dwNumConns As Long
End Type
Private Declare Function GetTcpStatistics Lib "iphlpapi.dll" (ByRef pTcpStats As MIB_TCPSTATS) As Long
Public Function GetLocalIPStats() As Long
Dim TcpStat As MIB_TCPSTATS
Dim tmp As String
If GetTcpStatistics(TcpStat) <> NO_ERROR Then
GetLocalIPStats = -1
Exit Function
End If
Select Case TcpStat.dwRtoAlgorithm
Case MIB_TCP_RTO_CONSTANT: tmp = "Constant Time-out"
Case MIB_TCP_RTO_RSRE: tmp = "MIL-STD-1778 Appendix B"
Case MIB_TCP_RTO_VANJ: tmp = "Van Jacobson's Algorithm"
Case MIB_TCP_RTO_OTHER: tmp = "Other"
End Select
End Function
Сейчас этот форум просматривают: Google-бот, PetalBot, Yandex-бот и гости: 2