Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / December 2007

Tip: Looking for answers? Try searching our database.

ajax web chat

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tem - 06 Dec 2007 05:13 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
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.