Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ravi
Visitor

regarding roURlTransfer

hi,

iam using roUrlTransfer to fetch data from a server.
My question is how do recognize whether server is connected or not.
if not connected how to identify the connection is not successfull.
It should throw an error when internet connection is not available.

Ravi Pulluri.
0 Kudos
2 REPLIES 2
ravi
Visitor

Re: regarding roURlTransfer

can somebody quickly reply please...
0 Kudos
greubel
Visitor

Re: regarding roURlTransfer

Pass ping() a url for some file on your server. "http://www.myserver.com/chk.txt"

Function Ping( url as string ) as boolean
? "* Ping "+url

o = CreateObject( "roUrlTransfer" )
o.SetUrl( url )
ev = sock.Head()
x = ev.GetResponseCode()
if x <> 200
return false
endif

return true

End Function
0 Kudos