constructor

(since )



Create a new APE instance

Description


string constructor ( [object options] )

Create a new APE instance.

The constuctor only create a APE instance, to connect to the APE server you need to use the start(); method

If you want to use APE do NOT start APE in that way, use APE.Client load() method

Parameters


options
An object with ape default options
  • server - (string, optional) APE server URL
  • pollTime - (integer) ; defaults to : 25000 Max time for a request in ms
  • identifier - (string) ; defaults to : ape identifier is used to differentiate two APE instance when you are using more than one application on your website and using Session.js
  • transport - (integer) ; defaults to : 1 Transport method used by APE,
    • 1 : Long polling
    • 2 : XHR streaming
    • 3 : forever iframe
    • 4 : JSONP
    • 5 : Websocket
  • frequency - (integer, optional) ; defaults to : The frequency identifier

  • Examples


    var Ape = new APE.Core({
        'server': 'ape.yourdomain.com'
    });
     

    var Ape = new APE.Core({
        'server': 'ape.yourdomain.com',
        'pollTime': 35000, //if you set pollTime to 35sec you need to set it on the server side to 55sec
        'identifier': 'myApplicationIdentifier',
        'transport': 2,
        'frequency': 3
    });
     

    User notes


    # No comment

    Post a note


    User notes may be edited or deleted, and usually a note is deleted because of the following reasons:
    • Bugs: Instead report a bug
    • Missing documentation: report that as a bug.
    • Support questions: See the community for available options.

    In other words, do not ask questions within the user notes.

    Note <b>,<u>,<i> HTML tags are allowed in the posts and the note formatting is preserved. URLs will be turned into clickable links, JavaScipt and C code blocks enclosed in the <source="javascript">JS Code</source> and <source="c">C Code</source> tags will be source highlighted automatically.