connectToServer( [onNotification] ) method

Resumes the connection to the SUP server.

Companion function to hwc.disconnectFromServer. This function should only be called after the connection to the SUP server has been suspened with a call to hwc.disconnectFromServer.

Syntax

<static> connectToServer( [onNotification] )

Parameters

Name Type Argument Description
onNotification anonymous.LogListener (optional) A log listener callback function.If you are interested in the connection state it is recommended that you call hwc.addConnectionListener before calling hwc.connectToServer.

Example

hwc.connectToServer();
// Add a log listener while calling hwc.connectToServer.
var logListener = function( time, event, message )
{
   alert(message);
}
hwc.connectToServer( logListener );

Source

hwc-api.js, line 601.