Re: NSFileHandleDataAvailableNotification
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.