How to know whether or not the client has closed the HTTP connection

Hi.

Please teach me.
How to detect HTTP connection closed by the client before sending a response?
If I detect it, I want to tell it to other applications.

Thank you.