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, frequency - (integer, optional) ; defaults to : The frequency identifier
- 1 : Long polling
- 2 : XHR streaming
- 3 : forever iframe
- 4 : JSONP
- 5 : Websocket
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
CollaborAPE to our wiki !
Find the information you need on the APE Official Wiki : Install, Server, JSF, Help...
