• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Can server side AS defines shared variable between all instances?

New Here ,
Aug 29, 2016 Aug 29, 2016

Copy link to clipboard

Copied

I want to create variable that share between all instances of application.

For example. I want to share number of connections.

rtmp://example.com/testApp/instanceA : 2 connections

rtmp://example.com/testApp/instanceB : 3 connections

=> 5 connections.

I tried to set property to "application" object in AS.

/opt/adobe/ams/applications/testApp/testApp.asc

application.onConnect = function(cli) {

  applicaion.counter += 1;

  trace(application.counter);

}

but "application" object is shared by same instance, isn't shared by application.

so testApp/instanceA output 2, and testApp/instanceB output 3.

# It's just example. I know that Administration API has getServerStats for count connections.

Thanks.

Views

231

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 27, 2016 Sep 27, 2016

Copy link to clipboard

Copied

LATEST

Did you go through SharedObjects documentation?

Adobe Media Server Help | About shared objects

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines