Voikohan VB:llä päästä käsiksi netin siirtoihin sen verran että saisi mitattua paljon tietoa lähettää ja vastaanottaa, tyyliin Netlimiter?
No siis adsl:llä. Mulla mitään motukkaa ole.
Joo no TCP liikennettä voi monitoroida GetTCPStatistic API:lla
IP pinon liikennettä GetIpStatistics API:lla
tässä TCP esimerkki
Laita formiin leveä listbox ja timer1 (2000 ms)
Private Type PMIB_TCPSTATS
dwRtoAlgorithm As Long ' time-out algorithm
dwRtoMin As Long ' minimum time-out
dwRtoMax As Long ' maximum time-out
dwMaxConn As Long ' maximum connections
dwActiveOpens As Long ' active opens
dwPassiveOpens As Long ' passive opens
dwAttemptFails As Long ' failed attempts
dwEstabResets As Long ' established connections reset
dwCurrEstab As Long ' established connections
dwInSegs As Long ' segments received
dwOutSegs As Long ' segment sent
dwRetransSegs As Long ' segments retransmitted
dwInErrs As Long ' incoming errors
dwOutRsts As Long ' outgoing resets
dwNumConns As Long ' cumulative connections
End Type
Private Declare Function GetTcpStatistics Lib "iphlpapi" (pStats As PMIB_TCPSTATS) As Long
Private Sub Timer1_Timer()
List1.Clear
Dim TcpStatistic As PMIB_TCPSTATS
GetTcpStatistics TcpStatistic
With TcpStatistic
List1.AddItem "Saapuneet segmentit" & CStr(.dwInSegs)
List1.AddItem "Lähetetyt segmentit" & CStr(.dwOutSegs)
End With
End SubPerskuta. Tosta ku tietäis segmentin koon niin johan ois mahtavaa! Mistä sä ton taioit.
Aihe on jo aika vanha, joten et voi enää vastata siihen.