Just to be clear for Paul... You can't always tell whether or not a connection is actually valid unless/until you actually try to read/ write the connection.

Of course, this depends on the specifics of the underlying transport (such as TCP, UDP, etc.), nature of the network, etc. A good set of books are W. Richard Stevens' "TCP/IP Illustrated".

Take care,
John

On Wednesday 2008.08.13, at 10:26 , Jerome Louvel wrote:


Paul,

Ok that makes more sense now :)

The closest you'll find in the Restlet API is the
org.restlet.service.ConnectorService class that has two callback methods:
- beforeSend(Representation entity)
- afterSend(Representation entity)

Maybe we could introduce a new call-back method "onSendError(...)" that would inform you about the failed response and the reason for failure. This
service is available for each application.

If you like the idea, could you create a new RFE for it?

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com


-----Message d'origine-----
De : Paul J. Lucas [mailto:[EMAIL PROTECTED]
Envoye : mercredi 13 aout 2008 18:59
A : [email protected]
Objet : Re: Knowing if a client disconnected?

On Aug 13, 2008, at 9:53 AM, Jerome Louvel wrote:

If the socket is broken or was closed by the client while the
response is
written, you won't be able to "restore" it. However, you can log the
fact
the you got this request from this client and wait for the client to
retry
its request.

OK, but my question was: how do I *know* it actually happened?

- Paul


Reply via email to