Description
Method; sends a message to all clients subscribing to the stream and the message is processed
by the handler specified on the client. Because the server has higher priority than the clients,
the server can still send a message on a stream owned by a client. Unlike the
Stream.play()
method, the server does not need to take ownership of a stream from the client in order to
send a message. After
is called, the client still owns the stream as a publisher.
send()
Example
The following example calls the method
on the client-side Stream object and sends it the
Test
string
:
"hello world"
application.streams["foo"].send("Test", "hello world");
The following example is the client-side ActionScript that receives the
call. The
Stream.send
method
is defined on the Stream object:
Test
tStream.Test = function(str) {
// Insert code to process the str object.
}
Stream.setBufferTime()
Availability
Flash Communication Server MX 1.0.
Usage
myStream.setBufferTime()
Description
Method; increases the message queue length. When you play a stream from a remote server,
the
method sends a message to the remote server that adjusts the
Stream.setBufferTime
length of the message queue. The default length of the message queue is 2 seconds. You
should set the buffer time higher when playing a high-quality recorded stream over a low-
bandwidth network.
When a user clicks a seek button in an application, buffered packets are sent to the server. The
buffered seeking in a Flash Media Server application occurs on the server; the Flash Media
Server doesn't support client-side buffering. The seek time can be smaller or larger than the
buffer size, and it has no direct relationship to the buffer size. Every time the server receives a
seek request from Flash Player, it clears the message queue on the server. The server tries to
seek to the desired position and starts filling the queue again. At the same time, Flash Player
also clears its own buffer after a seek request, and the buffer is eventually filled after the server
starts sending the new messages.
Stream class
157
Need help?
Do you have a question about the FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE and is the answer not in the manual?