This covers Javascript longpoll for custom client and Flash use cometstream.
XHR
XMLHttpRequest
XDR1
Cross Domain Request
First, try either the XHR or2 XDR chat demo, it's the little black box in the bottom right corner!
If you want to chat between XDR and2 XHR chats make sure you use two different browser applications2.
To create and join a channel type /join <name>
To leave the channel type /exit
Type /list for channel listing and /color <rrggbb> to change color.
With XDR long-poll you can add the chat widget to any page, notwithstanding of platform and domain, without serverside modifications. In a few rows of html, some images, one css and js file; you're truly minutes away from having your own industrial strength, real-time, comet chat; accessible from behind the thickest of firewalls.
Try it now: download!
Comet is all about corporate firewalls, because you want to reach everyone, everywhere, you need to use HTTP on port 80. Now you can push data over HTTP on port 80 in real-time.
Rupy enables you to connect 10000+ concurrent users with one server, this number can scale to 30000+ depending on your application.
We use long-polling for both transports because it's the most robust way to handle gateway timeouts and also the only implementation that works on all browsers without fragmenting the code (implementing different solutions for some browsers).
In web-browser context also known as 'Ajax Push', see Comet for more information.
Download the talk application and extract it. Enter the extracted talk/ folder and start rupy with either the run.bat or run.sh script depending on your OS. Then run ant in that same talk/ folder, this should build and deploy the talk.jar application to your rupy server. Lastly, browse to http://localhost:8000/talk.html and chat in real-time over HTTP!
If you want to use rupy talk with apache enable mod_proxy and add something along these lines:
<VirtualHost *:80>
ProxyPass /poll http://localhost:8000/poll
ProxyPass /broadcast http://localhost:8000/broadcast
</VirtualHost>
1 Also known as XSS or cross site scripting.
2 The session is reused for one browser type, so you need to use two different browser types (Internet Explorer, Firefox, Chrome or Safari). Also the HTTP spec. only allows clients to connect maximum two sockets per domain; so the long-poll requests will lock the browser if you try to chat between XHR tabs in the same browser type.
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: deepakra... (code.google.com)@gmail.com
its really nice to see rupy , i checked your comet app but its continuous polling ,please publish any example on long polling , Thanks for this nice stuff .
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: marc.la... (code.google.com)@gmail.com
Actually talk is long polling. I think you might be looking for streaming; then you need an applet or flash client. JavaScript? has lackluster compatibility for streaming.
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: vohuynhv... (code.google.com)@gmail.com
I got lost connection with talk app. After some munites, user just send message but can't receive any messages. So, I must reload browser to back normal?...
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: marc.la... (code.google.com)@gmail.com
That happens sometimes. Look in the log and try to reproduce it and submit a bug report under the Issues tab.