• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to find out of connection was closed by client (using CFNetwork)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
  • Prev by Date: Apple File Sharing and ssh
  • Next by Date: Rendezvous hacking
  • Previous by thread: Apple File Sharing and ssh
  • Next by thread: Rendezvous hacking
  • Index(es):
    • Date
    • Thread