lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> On Behalf Of Satheesh Kumar
> Sent: maandag 30 april 2012 1:40
> To: lua-l@lists.lua.org
> Subject: Detect Internet connection Speed
> 
> I am using Lua to develop a mobile appication.
> Is there any function ( in lua sockets or other) to determine the speed
> of the device's internet connection?
> 
> Or should I just download a file and calculate (bytes/time)
> 
> I need to detect if the device's internet is 2G or not..
> 

If possible, you should make it a dynamic property. Just downloading a file
and calculating is imprecise and wasting resources just for a test. So based
on its historic data the device should assume an initial state, from there
on monitor bytes/time, latency, errors and other proxy metrics to
dynamically adjust.
This is probably not appropriate, but might give you some ideas;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.38.8600&rep=rep1&ty
pe=pdf
Doing this from Lua is going to be a challenge, but I would be interested in
the overall result