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

Re: NSFileHandleDataAvailableNotification


  • Subject: Re: NSFileHandleDataAvailableNotification
  • From: Dustin Voss <email@hidden>
  • Date: Thu, 10 Jul 2003 11:26:14 -0700

On Wednesday, July 9, 2003, at 03:29 PM, Mark Levin wrote:

I have a client-server setup over a connection with NSFileHandles on both ends. After the server and client sockets are initialized with BSD calls up to listen() and connect() respectively, they are hooked up with acceptConnectionInBackgroundAndNotify and waitForDataInBackgroundAndNotify. Each time some data is handled, I call waitForDataInBackgroundAndNotify again, since the documentation implies that only a single notification will be posted. However, I then receive a constant stream of available data notifications, none of which provides any data when readDataToEndOfFile is called. What am I doing wrong?

Well, I don't know what you're doing wrong, if anything. However, you might want to consider using an already-written library to handle your communication. Check out <http://www.cocoadev.com/?SocketClasses>.

One of them, EDCommon, subclasses NSFileHandle, so you may find that easier to work with. You can get it from <http://www.mulle-kybernetik.com/software/EDFrameworks/ download.html#EDCommon>.
_______________________________________________
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.
References: 
 >NSFileHandleDataAvailableNotification (From: Mark Levin <email@hidden>)

  • Prev by Date: Re: Complex NSCells in an NSTableView
  • Next by Date: Re: multiple definitions of compare: -- design flaw?
  • Previous by thread: NSFileHandleDataAvailableNotification
  • Next by thread: NSMovieView beeping on keyboard controls
  • Index(es):
    • Date
    • Thread