Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
ravi
Level 7

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
ravi
Level 7

Re: regarding roURlTransfer

can somebody quickly reply please...
0 Kudos
greubel
Level 7

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