PDA

View Full Version : Can I Change Network Timeouts?



NeoMorph
October 28th, 2007, 09:06 PM
I want to reduce the time of the timeout for things such as Rons win.PingEx and win.URLDownloadToMemory. As I am doing stuff locally it normally is very quick (less than a second) and when I need to test with the server off (ie when I turn off the XBOX and Girder pings it to see if it is on or not) I don't need to wait 10 seconds or so to know it's offline.

Being able to download the timeout to 1500ms would cover it but I can't see how to do it or if it's even possible.

Ron
October 29th, 2007, 06:40 AM
You can change URLDownloadTo*** but not Ping. For the former check out lwinfunc.lua all the way at the bottom. You'll see that URLDownloadTo*** are actually lua functions that wrap around the CURL library, which allows you to specify a timeout.

NeoMorph
October 29th, 2007, 06:58 AM
That's the Callback parameter, right?

Once Rob gets the HID wrapper done I'll be able to do without ping as I have made a hardware interface. All that's needed is the software to run it now. Mind you I discovered a possible problem with my interface as if I run a game the interface doesn't turn off... I know the fix, just got to add another reed relay is all - it's just sods law that I spotted it five mins ago.

It's annoying that my XBMC interface works fine when XBMC is running... turn off the xbox though and Girder freezes as if to say "WHA.... WHAT HAPPENED". I just need to get Girder to timeout quicker is all.

NeoMorph
October 30th, 2007, 01:29 PM
Ron I decided to go external and made a VB program that handles the ping... Check out how fast it detects that the xbox goes offline... (note the XBOX Power action is a toggle so I don't know if it's turning the xbox on or off...)


Time Date Source Details Payloads
21:27:26:003 10/30/2007 Girder XBMC OFFLINE
21:27:25:663 10/30/2007 XBOX Power OkXBMC.gml:\XBMC\XBOX Power

Can't beat that for a timeout eh? Don't even need Rob's HID wrapper so urgent now. Now all I have to do is sort out the timeouts for Curl.