RTMP/E

broadcastMsg(scope:String, method:String [, arg0, ..., argN])

HTTP

 http://localhost:1111/admin/broadcastMsg?auser=admin&apswd=admin&scope="App:accept"&method="bounceback"&arg0="hello"&arg1="world"

Broadcasts a message to specified clients (either server, adaptor, vhost, application, or application instance wide).

Availability

Flash Communication Server 1.0.

Parameters

scope

A String indicating the broadcast audience. It can be any of the following:

  • “Server” (server-wide broadcast)

  • “VHost” (current vhost-wide broadcast)

  • “App:<name>” (application-wide broadcast on current vhost)

  • “App:<name>/<instance>” (instance-wide broadcast on current vhost)

  • “Adaptor[:<name>]” (a specific, adaptor-wide broadcast)

  • “Adaptor[:<name>]/VHost[:<name>]” (a specific vhost-wide broadcast on the specified adaptor)

  • “Adaptor[:<name>]/VHost[:<name>]/App:<name>” (an application-wide broadcast on the specified adaptor and vhost

  • “Adaptor[:<name>]/VHost[:<name>]/App:<name>/<instance>” (an instance-wide broadcast on the specified adaptor, vhost, and application)

method

A String indicating the remote method that is invoked on all the broadcast recipients.

arg0, ..., argN

Positional arguments (arg0, arg1, arg2, etc.) passed in as the remote method invocation arguments. There can be multiple arguments, but they must be in the form argN, where N is the argument position. The arguments must be numbered contiguously.

auser

A String indicating the user name of the administrator.

apswd

A String indicating the password of the administrator.

Returns

RTMP/E

If the call succeeds, the server sends a reply information object with a level property of status and a code property of NetConnection.Call.Success

If the call fails, the server sends a reply information object with a level property of error and a code property of NetConnection.Admin.CommandFailed or a more specific value, if available. Some objects might also have a description property that contains a string describing the cause of the failure. If the specific administrator does not exist, this method fails.

HTTP

A call returns XML with the following structure:

 <result>   <level></level>   <code></code>   <timestamp></timestamp>  </result>

Example

 nc_admin = new NetConnection(); 
 nc_admin.connect("rtmp://localhost:1111/admin", "JLee", "x52z49ab"); 
 nc_admin.call("broadcastMsg", new Result(), “App:test”, “testMethod”, “Hello”, “World”);

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy