How to find out of connection was closed by client (using CFNetwork)
How to find out of connection was closed by client (using CFNetwork)
- Subject: How to find out of connection was closed by client (using CFNetwork)
- From: Martin Bestmann <email@hidden>
- Date: Wed, 10 Dec 2003 17:14:24 +0100
Hi,
I'm using CFNetwork with a client server application. When a server
request comes in I handle this and return data to the client. The
client will read the data and then close the stream. How can I find out
on the server that the connect has been closed by the client.
CFReadStreamGetStatus still returns kCFStreamStatusOpen and I never get
anything that tells me that the stream has been closed by the client.
After client closed the stream I do get a message that bytes are
available using CFReadStreamHasBytesAvailable. When I try to read bytes
I get a kCFStreamEventEndEncountered callback after a few seconds
Any idea on how to correctly detect if a stream has been closed by the
other end?
Thanks,
Martin
------------------------------------------------------------------------
-----------------------
Martin Bestmann Netopia
Development GmbH
Phone: +49-9134-9942-0 Weingasse 26
Fax: +49-9134-997911 91077 Neunkirchen am
Brand
e-mail:email@hidden Germany
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.