• 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: NSFileHandle socket question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSFileHandle socket question


  • Subject: Re: NSFileHandle socket question
  • From: Dustin Mierau <email@hidden>
  • Date: Sun, 23 Dec 2001 20:40:57 -0800

Doug,

I think this works the same way recv() does, if you a size of 0 is passed to your callback, the connection has closed. You might just want to use the socket api directly and skip the NSFileHandle stuff, it will give you a little more flexibility.

-dustin

On Sunday, December 23, 2001, at 05:31 PM, Doug Brown wrote:

Hi,

I have been working on creating a socket for an app that I'm working on, and NSFileHandle seems to be the perfect way to handle sending and receiving data - it's working just great with -readInBackgroundAndNotify. I am baffled at one thing, though. How do I find out if the remote side closed the connection? I don't see any method or notification that would tell me when the connection is closed. I need to know this so I can tell the user that the connection was dropped and reset everything so the app knows it is disconnected from the server again. Thanks,

Doug
_______________________________________________
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: NSFileHandle socket question
      • From: email@hidden
    • Re: NSFileHandle socket question
      • From: Dustin Mierau <email@hidden>
    • Re: NSFileHandle socket question
      • From: Doug Brown <email@hidden>
References: 
 >NSFileHandle socket question (From: Doug Brown <email@hidden>)

  • Prev by Date: Re: row bg color in NSOutlineView
  • Next by Date: Re: Executing AppleScript from NSString?
  • Previous by thread: NSFileHandle socket question
  • Next by thread: Re: NSFileHandle socket question
  • Index(es):
    • Date
    • Thread