Does anyone know how web-based chat like Gtalk in gmail works?
how come it doesn't need to constantly refresh/send a request to the server
to get new message?
other web based chat room have to constantly refresh the page (every 10 sec)
to get new messages
Tem
PJ on Development - 06 Dec 2007 10:45 GMT
> Does anyone know how web-based chat like Gtalk in gmail works?
> how come it doesn't need to constantly refresh/send a request to the server
[quoted text clipped - 3 lines]
>
> Tem
Hi,
Nowadays, the answer is quite simple and you can emulate this behavior
using an UpdatePanel and a TimerControl from the AJAX tool kit.
Regards,
Paulo Santos
http://pjondevelopment.50webs.com
cfps.Christian - 06 Dec 2007 14:29 GMT
> Does anyone know how web-based chat like Gtalk in gmail works?
> how come it doesn't need to constantly refresh/send a request to the server
[quoted text clipped - 3 lines]
>
> Tem
With the chat app that I did I used a hidden IFrame that refreshed
every second and if it had a new message it posted it to your screen,
but I also had to do it entirely in ASP (not ASP.NET). If I were to
redo it I would probably have used AJAX controls or Web Services.
bruce barker - 06 Dec 2007 19:24 GMT
actually it does. it uses an iframe and server push instead of polling
the server for updates. it then uses dhtml to update the display. as
this ties up a connection, you would have trouble doing this with
asp.net and a lot of users.
-- bruce (sqlwork.com)
> Does anyone know how web-based chat like Gtalk in gmail works?
> how come it doesn't need to constantly refresh/send a request to the
[quoted text clipped - 3 lines]
>
> Tem
Tem - 07 Dec 2007 05:07 GMT
Could you explain "server push instead of polling
the server for updates"
I thought the client has to submit a request first to get a response from
the server
Thanks
Tem
> actually it does. it uses an iframe and server push instead of polling the
> server for updates. it then uses dhtml to update the display. as this ties
[quoted text clipped - 10 lines]
>>
>> Tem
Steve C. Orr [MCSD, MVP, CSM, ASP Insider] - 10 Dec 2007 23:58 GMT
Here I've detailed the code for an AJAX based chat room that seems to do
what you desire:
http://SteveOrr.net/articles/WebChat.aspx

Signature
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
> Could you explain "server push instead of polling
> the server for updates"
[quoted text clipped - 19 lines]
>>>
>>> Tem