
113
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
Example
The following example removes the “permanent” status of a neighbor with the RTMFP endpoint name
bootstrap-peer
:
ng.removePermanentNeighborByName("bootstrap-peer");
NetGroup.sendToAllNeighbors()
netGroup.sendToAllNeighbors(message)
Sends a message to all neighbors. Returns NetGroupSendResult.SENT if at least one neighbor was selected.
When a node receives a message, a "NetGroup.SendTo.Notify" is sent to the NetStream.onStatus() method.
Use this method to route messages directly to a peer, also called “direct routing”. See Route messages directly to a peer.
Availability
Flash Media Server 4
Parameters
message An Object. The message to send.
Returns
A String. A property of the “NetGroupSendResult class” on page 117 indicating the success or failure of the send.
NetGroup.sendToNearest()
netGroup.sendToNearest(message, groupAddress)
Sends a message to the neighbor (or local node) nearest to the specified group address. Considers neighbors from the
entire ring. Returns
NetGroupSendResult.SENT if the message was successfully sent toward its destination.
When a node receives a message, "NetGroup.SendTo.Notify" is sent to the NetStream.onStatus() method.
Use this method to route messages directly to a peer, also called “direct routing”. See Route messages directly to a peer.
Availability
Flash Media Server 4
Parameters
message An Object. The message to send.
groupAddress A String. The group address toward which to route the message.
Returns
A String. A property of the “NetGroupSendResult class” on page 117 indicating the success or failure of the send.
NetGroup.sendToNeighbor()
netGroup.sendToNeighbor(message, sendMode)
Sends a message to the neighbor specified by the sendMode parameter. Returns NetGroupSendResult.SENT if the
message was successfully sent to the requested destination.
When a node receives a message, a "NetGroup.SendTo.Notify" is sent to the NetStream.onStatus() method.
Commenti su questo manuale