If you are using Http then you have no alternative but to have a seperate XmlHttpRequest polling for a change on the server. Something else maybe possible in something other than Http. [EMAIL PROTECTED]
> Date: Fri, 4 Jan 2008 11:30:21 -0500> From: [EMAIL PROTECTED]> Subject: > [ADVANCED-DOTNET] Server to Browser Event Distribution> To: > ADVANCED-DOTNET@DISCUSS.DEVELOP.COM> > I've created an ajax chat client and I > am trying to avoid doing a http call> every second to check on messages. I > would like to call the web service and> the following occur.> > 1. For a > particular ChatRoomID, check to see if the LastMessageID >> > BrowsersLastMessageID.> > 2. If the LastMessageID is greater, grab all of the > necessary Messages and> return them to the browser in the Resonse.> > 3. If > the LastMessageID = BrowsersLastMessageID, then register for the> ChatRoom > object's NewMessage Event.> > 4. If 30 seconds passes or the Event fires, > return response to the browser.> > I'm having a tough time understanding how > I can register for an event when> I'm inside the HTTP pipeline. Do I have to > register on another thread? If> I do, what to I do with the initial thread? I > supposed I could poll the> Chat Object for 30 seconds instead of registering > for an event...would that> be the best way to solve this problem?> > Thank > you in advance for any feedback you can offer.> > > ===================================> This list is hosted by DevelopMentorĀ® > http://www.develop.com> > View archives and manage your subscription(s) at > http://discuss.develop.com _________________________________________________________________ Telly addicts unite! http://www.searchgamesbox.com/tvtown.shtml =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com