Hello,
Can I setup a global variable in the server, which will be available for all connected users in real time?
If yes, how to do this and access it?
Thx
Realtime global variable!?
-
hassanayoub85
- Posts: 21
- Joined: 17 Jan 2012, 17:50
Hi.
I suggest you to use a variable stored in a Zone-Level Extension so every user that is logged in that zone can access it. Then, for retrieving that variable, you have 2 options available:
1. You just send an ExtensionRequest from the client to that extension, which sends back the value of that variable
2. Schedule a new task on the Server-Side which runs at a specific rate, and each time it runs, it sends the value of that variable to everyone that is connected.
Of course this all depends on your application and the kind of variable you're dealing with. Please keep in mind that sending data to a lot of people can use significant network resources.
I suggest you to use a variable stored in a Zone-Level Extension so every user that is logged in that zone can access it. Then, for retrieving that variable, you have 2 options available:
1. You just send an ExtensionRequest from the client to that extension, which sends back the value of that variable
2. Schedule a new task on the Server-Side which runs at a specific rate, and each time it runs, it sends the value of that variable to everyone that is connected.
Of course this all depends on your application and the kind of variable you're dealing with. Please keep in mind that sending data to a lot of people can use significant network resources.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
-
hassanayoub85
- Posts: 21
- Joined: 17 Jan 2012, 17:50
Hmm? So what kind of global variable are you referring to?
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
-
hassanayoub85
- Posts: 21
- Joined: 17 Jan 2012, 17:50