• 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
Re: How to stop listening on a port?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: How to stop listening on a port?
      • From: Hasan Diwan <email@hidden>
References: 
 >How to stop listening on a port? (From: John Anderson <email@hidden>)

  • Prev by Date: Re: Using a subclass in IB
  • Next by Date: Re: cocoa-dev digest, Vol 2 #1502 - 13 msgs
  • Previous by thread: How to stop listening on a port?
  • Next by thread: Re: How to stop listening on a port?
  • Index(es):
    • Date
    • Thread