Re: Timeouts on CFWriteStreams
Re: Timeouts on CFWriteStreams
- Subject: Re: Timeouts on CFWriteStreams
- From: Ulrich Bauer <email@hidden>
- Date: Tue, 4 Mar 2003 00:00:52 +0100
On Tuesday, February 25, 2003, at 8:02 AM, Ulrich Bauer wrote:
how do I set write timeouts on CFWriteStreams? When the remote side
loses the connection unexpectedly, I don't get any notification, and
I still get kCFStreamEventCanAcceptBytes events. How can I find out
that the Stream does not send the bytes anymore?
On Montag, Mdr 3, 2003, at 20:05 Europe/Berlin, Jeremy Wyld wrote:
You should set up the stream for asynchronous usage (set a client and
schedule on a run loop) and create a run loop timer which will fire
after a certain amount of time. When you write bytes, you simply
reset the timer to fire in the future.
You should look at the Echo example (specifically EchoContext.c) on
how to do this.
OK, I'm already using asynchronous CFStream; my problem is that I get
kCFStreamEventCanAcceptBytes events even after the remote side has
died, apparently until some buffer is full (CFStream buffer or kernel
socket buffer, I can't tell).
Thanks for your info,
--
Ulrich Bauer Mail: email@hidden
Lehrstuhl f|r Angewandte Softwaretechnik Tel.: +49 (89) 289-18240
Institut f|r Informatik Raum: 01.07.039
Technische Universitdt M|nchen PGP ID: 0361C54B
_______________________________________________
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.