Hi all, On 6/29/06, Jonathan LaCour <[EMAIL PROTECTED]> wrote: > > Arnar Birgisson wrote: > > > I looked around in medusa but didn't see (or reckognize) what you are > > talking about. Could you point it out to me? :o) > > I believe its called select_trigger.py, and it has a bunch of comments > in there for how to use it.
I played a little with this comet stuff, I don't have anything working yet. I ported (or tried to) the javascript of Nevow's Athena stuff to Mochikit-only. Now I just need the other end (the server end). Having the comet responder on a different host and/or port than CP causes all kinds of permission problems in the browser. Firefox doesn't allow iframes to access js objects or functions in the parent frame, and XMLHttpRequests can only be made to the exact same host and port as the parent page. Athena doesn't use Iframes but reconnecting XMLHttpRequests: it connects, sends off client-serer messages and waits for a message from the server. Once messages from the server arrive, the XMLHttpRequest closes and a new one is opened immediately. The simple way would be to have the controller handling this in CP block the current thread until data/events are available to send to the client. Of course, this ties up one thread pr. each connected client for extended periods of time. Is there any way to "hijack" the socket from the CP request and hand it over to a thread running asyncore or Twisted for processing, and terminating the CP thread without closing the socket or writing anything to it? That way, the CP thread finishes immediatly and only one long-running thread is required to handle the Comet messages asynchronously. Arnar --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~----------~----~----~----~------~----~------~--~---

