netutils.js
No description.

File Location

/goog/labs/net/webchannel/netutils.js


Public Protected Private

Global Functions

goog.labs.net.webChannel.netUtils.clearImageCallbacks_(img)
Clears handlers to avoid memory leaks.
Arguments:
img : Image
The image to clear handlers from.
code »
goog.labs.net.webChannel.netUtils.imageCallback_(channelDebugimgdebugTextresultcallback)
Wrap the image callback with debug and cleanup logic.
Arguments:
channelDebug : !WebChannelDebug
The WebChannelDebug object.
img : !Image
The image element.
debugText : string
The debug text.
result : boolean
The result of image loading.
callback : function(boolean)
The image callback.
code »
goog.labs.net.webChannel.netUtils.testLoadImage(urltimeoutcallback)
Test loading the given image.
Arguments:
url : string
URL to the image.
timeout : number
Milliseconds before giving up.
callback : function(boolean)
Function to call with results.
code »
goog.labs.net.webChannel.netUtils.testLoadImageWithRetries(urltimeoutcallbackretriesopt_pauseBetweenRetriesMS)
Test loading the given image, retrying if necessary.
Arguments:
url : string
URL to the image.
timeout : number
Milliseconds before giving up.
callback : function(boolean)
Function to call with results.
retries : number
The number of times to retry.
opt_pauseBetweenRetriesMS : number=
Optional number of milliseconds between retries - defaults to 0.
code »
goog.labs.net.webChannel.netUtils.testNetwork(callbackopt_imageUri)
Pings the network with an image URI to check if an error is a server error or user's network error. The caller needs to add a 'rand' parameter to make sure the response is not fulfilled by browser cache.
Arguments:
callback : function(boolean)
The function to call back with results.
opt_imageUri : goog.Uri=
The URI (of an image) to use for the network test.
code »

Directory webchannel

File Reference