1

I just want to ask that if it is possible to to receive chat from an HTML page to twisted web server and PUSH it on to another HTML page asynchronously.

I just want someone to point out the way to do this and things to use (I want to avoid using web sockets).

help much appreciated

alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195
mayank vats
  • 444
  • 2
  • 6
  • 17
  • Sure it's possible, but this question is far too broad to get a useful answer. – Jean-Paul Calderone May 17 '13 at 13:26
  • I know and i am sorry for that .Currently i have made a server that receives a GET request from the client HTML page and renders a HTML page .After that i am stuck on how to receive a line (chat) and push it to another client.SO i have 2 main questions: 1)**should i use Line receiver** 2)**Can i use render_GET and lineReceiver in same program and how?** – mayank vats May 17 '13 at 15:29

2 Answers2

0

AJAX long polling, for example. See http://en.wikipedia.org/wiki/Comet_%28programming%29

You should use another GET (or, better, POST) handler that receives AJAX request, decodes it and broadcast to all polling connections. So, you need handler (page) for polling and for sending.

monoid
  • 1,661
  • 11
  • 16
  • I did mention that i want to do it asynchronously and want the server to push the message upon receiving a get request.@Jean-Paul Calderone – mayank vats May 18 '13 at 03:00
  • "Comet is a web application model in which a long-held HTTP request allows a web server to push data to a browser, without the browser explicitly requesting it." (Wikipedia, above link). – monoid May 18 '13 at 10:02
0

Server-sent events is an API that works in many browsers. Not IE, unfortunately, but if you want live two-way stuff to a web browser and you want to address a wide market you're probably going to need at least two implementations anyway.

Glyph
  • 31,152
  • 11
  • 87
  • 129