How to detect closed connection
Dean Banks <[email protected]> Tue, 12 Jul 2011 07:40:31 -0700
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============3162475490101938565==
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi all,
<br>
<br>
I have a FCGI application written in C. We have cases where a client
closes an active connection--i.e. leaves the page during page
load--which we'd like to detect within the application, if possible.
We have our web server (nginx) configured to close the FCGI
connection when the client connection is unexpectedly closed, so my
hope is that by looking at the FCGI stream state at the end of the
transaction, we <em>might</em> be able to detect a client-initiated
closed connection.
<p>My question is: Is it possible to detect this using
FCGX_GetError() on the output stream right before calling
FCGX_Finish_r() ? If not, how might I trap such a condition.</p>
Cheers.
</body>
</html>
--===============3162475490101938565==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
FastCGI-developers mailing list
FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
http://mailman.fastcgi.com/mailman/listinfo/fastcgi-developers
--===============3162475490101938565==--