The IResponse::IsClientConnected method determines if the client has disconnected from the server.
HRESULT IsClientConnected(
VARIANT_BOOL pfIsClientConnected // pointer to a Boolean that
// indicates whether or not the client is connected
);
Response Object