> >> There is technically no way that you can determine what you want in
> >> that way. Something like the IsClientConnected property of IIS can't
> >> tell you that either. If it is being claimed that it can, then the
> >> claim is wrong.
>
> > I thought that for a TCP connection, the close() call will block
> > untill the FIN/ACK packet is received?
>
> A close() call would not be occurring at the time that the last of the
> data has been written/flushed for a response. It will only occur after
> mod_wsgi has returned control back to Apache, with the close() being
> done by Apache. If keep alive is enabled, it may not even happen
> straight away, but may only occur after keep alive timeout if no
> subsequent request. Connection could even be reused for another
> request by same client.

Yeah, I realized that this wasn't perfect. Things like proxies would
make things even more error-prone. I'm basically trying to deal with
unreliable Internet connections in a data-sensitive, time-sensitive
environment, so knowing if they got the data and when they got it
becomes really important. The IsClientConnected property appeared to
get properly triggered by aborted Ajax connections or stopped
requests.

> Probably the only way to get confirmation is for the client to send a
> subsequent request to say that is has read all the data it could and
> how much it did actually read, the latter being validated against how
> much was sent. This could probably be packaged up nicely in some AJAX
> way with JS to be transparent to a user of the web page. Difficulties
> might come with where have multi process server. Just means though
> that state about the request would need to be stored in way accessible
> by all server process.

This was my backup plan, but it opens up the possibility that the user
could stop the outgoing Ajax receipt acknowledgment even though they
got the content. That's an application design issue, though, and not a
mod_wsgi problem.

Thanks for the quick responses.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"modwsgi" 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/modwsgi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to