
106
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
For more information, see Building peer-assisted networking applicationsin the Adobe Media Server Developer’s
Guide.
For information about peer-assisted networking, see Basics of P2P in Flash by Adobe Evangelist Tom Krcha. For
information about using groups with peer-assisted networking, see Social media experiences with Adobe Media
Server and RTMFP, also by Tom Krcha.
For information about the technical details behind peer-assisted networking, see P2P on the Flash Platform with
RTMFP by Adobe Computer Scientist Matthew Kaufman.
NetGroup class constructor
netGroup = new NetGroup(connection, groupspec)
Constructs a NetGroup on the specified NetConnection object and joins it to the group specified by the groupspec
parameter. Use the GroupSpecifier class to build the
groupspec string. In Server-Side ActionScript, you can pass a
groupspec String or a GroupSpecifier object as the groupspec argument. The NetConnection must use the RTMFP
protocol.
Throws an Error if either argument is missing or null, if the NetGroup fails to join the group specified in the
groupspec parameter, or if the protocol is not RTMFP.
The status messages are dispatched to “NetGroup.onStatus()” on page 110.
Availability
Flash Media Server 4
Parameters
connection A NetConnection object. The protocol must be RTMFP.
groupspec To publish or play a stream in a peer-to-peer multicast group, specify a groupspec string or a
GroupSpecifier object. To create a groupspec string, call
GroupSpecifier.toString().
Example
The following example passes a GroupSpecifier object as the groupspec parameter:
netGroup = new NetGroup(myConnection, myGroupSpecifier);
The following example passes a GroupSpecifier string as the groupspec parameter:
netGroup = new NetGroup(myConnection, myGroupSpecifier.toString());
NetGroup.addMemberHint()
netGroup.addMemberHint(peerID)
Manually adds a record specifying that peerID is a member of the Group. An immediate connection to it is attempted
only if it is needed for the topology.
Availability
Flash Media Server 4
Parameters
peerID A String. The peerID to add to the set of potential neighbors.
Comentários a estes Manuais