views:

544

answers:

3

How can comet be used with Flash programs?

What will be needed at server side for the same?
Does this require any customised servers or will normal IIS or Apache do?

Also is Juggernaut an example of flash based comet? how does it achieve comet?

A: 

Assuming you are talking about comet as in this article, you can achieve it using the URLLoader class. At the server side, you can use any technology that you would use with a normal AJAX application like jsp, php, asp etc. I remember reading somewhere that Flash closes the URLLoader connection after 30 seconds - you should take that into account while implementing long polling.

Amarghosh
A: 

Flash has an altogether bigger better alternative to comet - it has 'remoting' using rtmp!

There's a whole world of languages and servers for your flash client to talk to; google haxe, rtmpy, rtmpd, red5 for some of the free and Free ones.

One of the haxe tutorials is ... a chat client and server.

Will
A: 

Not exactly sure what you want but you can establish an open connection between the client and the server.

see this (flash client) and as an example, this (php socket server)

Tom
yes something similar.what we need is not constantly poll the server for data..instead the server should push data to client on updates.
Amitd
You can use sockets for that. Flash has an `XMLSocket` class which is more convenient than the plain Socket http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/XMLSocket.html The main problem with using sockets is that client side firewalls might prevent establishing socket connections in the first place - if you cannot predict the possibility of this happening in your expected user base, you will have to resort to using long polling.
Amarghosh
I personally prefer the Socket class as it provides more options.
Tom