Skip to content

APE Server Subusers

Louis Charette edited this page Apr 19, 2014 · 1 revision

Ape server distinguishes multiple windows and tabs in the same browser by using a [frequency](APE_JSF Frequency).

When the server sends a raw to an user it is also sent to all subusers (identifiable by their frequency). So the event will be received by all tabs and windows too.

If you want to target a specific window or tab you can send a raw to a subUser.

Multiple browsers on one client

When running 2 or more browsers simultaneuously on one client each browser has its own user and subusers (and own frequency for that matter).

Example:

        Ape.registerCmd('foo', true, function(params, info) {
        info.subuser.sendRaw('bar', {'ok':'true'});
        });

In the above example the raw is only sent to the window / tab that sent the cmd. This window or tab is disthinguishable by its frequency.

Clone this wiki locally