Thanks graeme, Yup, i know HTTP is stateless.. My question is more how to get the exception from a Resource object when trying to write to a closed socket.
cheers Seb On Mon, May 10, 2010 at 04:00:03PM +0200, Graeme Glass wrote: > On Mon, May 10, 2010 at 4:44 PM, Sebastien PASTOR > <[email protected]> wrote: > > Hi ! > > I am very new at Twisted. What i am trying to achieve is a simple web > > service using basic HTTTP GET and POST requests. My big requirement is > > being able to detect when the connection is closed client side. Bottom > > line being : i want to know that each GET or POST result has been > > successfully or not sent to the client. I could not managed to do that > > using WSGI. > > Is there way to try: catch sockets exception using Twisted or should i > > go the async way and use notifyFinish() and friends ? > > > > Thanks in advance ! > > > > > > Seb > > HTTP is stateless, you have no way of knowing if the client closed the > connection > > Take a look at this, for some ideas > http://en.wikipedia.org/wiki/Comet_%28programming%29 > > hth > > Graeme > > _______________________________________________ > Twisted-web mailing list > [email protected] > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web _______________________________________________ Twisted-web mailing list [email protected] http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
