• 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: Malte Tancred <email@hidden>
  • Date: Tue, 12 Nov 2002 08:16:06 +0100

On monday, nov 11, 2002, at 23:05 Europe/Stockholm, John Anderson wrote:

Oh, I think I see the problem then. I was getting the socket from the acceptance notification. So what I need to close is the original listening socket.

Right.

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(gotConnection:) name:NSFileHandleConnectionAcceptedNotification object:myNewtonFileHandle];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(dataReceived:) name:NSFileHandleReadCompletionNotification > object:myNewtonFileHandle];

Also, you probably don't want the second line. The read completion notification should be registered for the client socket given to you by the accept notification.

I don't think registering for read completions on the listening socket serves any purpose. I might be wrong of course.

Cheerio,
Malte
_______________________________________________
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: John Anderson <email@hidden>
References: 
 >Re: How to stop listening on a port? (From: John Anderson <email@hidden>)

  • Prev by Date: Re: General Cocoa Question
  • Next by Date: Re: [Q] Disabling an NSTableView
  • Previous by thread: Re: How to stop listening on a port?
  • Next by thread: Re: How to stop listening on a port?
  • Index(es):
    • Date
    • Thread