If a javascript client is running multiple instances of SFS to connect to multiple servers, is it possible to identify the specific instance from within the callback from an event listener.
By example if I have 2 instances:
Code: Select all
function someMethod()
{
sfs1 = new SFS2X.SmartFox(config1);
sfs1.addEventListener(SFS2X.SFSEvent.CONNECTION, someListener, this);
sfs2 = new SFS2X.SmartFox(config2);
sfs2.addEventListener(SFS2X.SFSEvent.CONNECTION, someListener, this);
}
function someListener(evtParams)
{
// identify sfs1 or sfs2 connected
}
is it possible to identify whether it is sfs1 or sfs2 which has connected (or any other listener function) or does there have to be a specific listener function for each instance of SFS?