Re: How to stop listening on a port?
Re: How to stop listening on a port?
- Subject: Re: How to stop listening on a port?
- From: Andreas Mayer <email@hidden>
- Date: Sun, 10 Nov 2002 18:57:19 +0100
Am Sonntag, 10.11.02 um 03:24 Uhr schrieb John Anderson:
The file handle should get
closed when I release the file handle, right?
It will not when you are still listening.
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(dataReceived:)
name:NSFileHandleReadCompletionNotification object:myNewtonFileHandle];
This starts a background thread that seems to call read() internally.
read() is a blocking call and will not return when the port is closed.
My solution was to do the reading myself. It's some work though, if you
don't want to poll.
bye. Andreas.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.