examples/endpointcon-client/build/endpointcon.js
/* open the connection to the server
   *
   *  connected(): Called when the 'connected' message is received
   *               If autoReconnect is true (default), the callback will be
   *               called each time the connection is opened.
   */
open the connection to the server
connected(): Called when the 'connected' message is received
If autoReconnect is true (default), the callback will be
called each time the connection is opened.
open the connection to the server connected () : Called when the ' connected ' message is received If autoReconnect is true ( default ) the callback will be called each time the connection is opened .
connect(connected) {
    var self = this;
    self._isConnecting = true;
    self._connectionFailed = false;
    self._isClosing = false;
    if (connected) {
      self.addListener("connected", function() {
        self._clearReconnectTimeout();
        connected(undefined, self._isReconnecting);
        self._isConnecting = false;
        self._isReconnecting = false;
      });
      self.addListener("failed", function(error) {
        self._isConnecting = false;
        self._connectionFailed = true;
        connected(error, self._isReconnecting);
      });
    }
    var url = self._buildWsUrl();
    self._makeWebSocketConnection(url);
  }
connect ( connected ) { var self = this ; self . _isConnecting = true ; self . _connectionFailed = false ; self . _isClosing = false ; if ( connected ) { self . addListener ( "connected" , function ( ) { self . _clearReconnectTimeout ( ) ; connected ( undefined , self . _isReconnecting ) ; self . _isConnecting = false ; self . _isReconnecting = false ; } ) ; self . addListener ( "failed" , function ( error ) { self . _isConnecting = false ; self . _connectionFailed = true ; connected ( error , self . _isReconnecting ) ; } ) ; } var url = self . _buildWsUrl ( ) ; self . _makeWebSocketConnection ( url ) ; }
open the connection to the server
  connected(): Called when the 'connected' message is received
               If autoReconnect is true (default), the callback will be
               called each time the connection is opened.
open the connection to the server connected () : Called when the ' connected ' message is received If autoReconnect is true ( default ) the callback will be called each time the connection is opened .