المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : could udp be used for getting network bandwidth?



C# Programming
12-22-2009, 05:40 AM
Hi,assume the download bandwidth is bigger than upload bandwidth.
I used udp to get the upload bandwidth.
Set the download bandwidth to Vr,the upload bandwidth to Vs,the transfer time is Tt,the first time just before send is Ts1,the second send time is Ts2,the first receive time is Tr1,the second time is Tr2.
I send the 1k at first then 50k at the second time.I send the socketbuffer to 100k.
because Tr-Ts = Tt+1/Vr+M/Vs(M is the length of data)
T'=Tr2 -Ts2-(Tr1-Ts1) = M'/Vs
i konw the T' and the M' so the Vs could be get.
But i find the time T' in a wide range !

could anyone point what is wrong?