I'm a bit confused. I would like to send messages from my Red5 Server to my Flash App... but I don't find any information how to do that...
Can anyone help me?
I'm a bit confused. I would like to send messages from my Red5 Server to my Flash App... but I don't find any information how to do that...
Can anyone help me?
This looks like a good start: http://www.red5tutorials.net/index.php/Tutorials:Getting_Started_With_Red5_Server
See near the bottom for their simple flash client.
Edit: More options given now that it's clear we're going from server-client:
Looks like you need to do something like this: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/NetConnection.html
and
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/NetStream.html
which would mean using "NetStream.play()" to get the server to stream data to the client.
Or you might want to look at the Socket class(es) and manually create a direct socket connection between the client and server.
Keep in mind here, I've never used Red5. Just trying to help :)
Hmm, by definition, the server serves and the client requests. So to create a push scenario, you still have to first initialize a connection from the client to the server. Then you can leave the connection idle until you need to send something to the client. Polling is the other method, where the server holds on to the messages and the client frequently checks in to see if new messages are available. A server cannot initiate a connection to the client. That would make the client a server. In other words, you could have the flash client register it's current IP with the server and open up a port itself, establishing itself as a server. Then the Red5 server becomes a client and can connect to the server inside the flash client. But I imagine many security restrictions will prevent your flash program from acting as a server in the real world.