Re: NSFileHandle, Serial & Async...
Re: NSFileHandle, Serial & Async...
- Subject: Re: NSFileHandle, Serial & Async...
- From: John Pannell <email@hidden>
- Date: Tue, 18 Sep 2001 15:19:30 -0600
Hi Jeff-
Would readInBackgroundAndNotify: suit your purposes? I would guess you
are never getting an EOF in the data stream from the modem, and thus
never getting a notification...
I'm a beginner, so I could be way off on this :-)
John P.
On Tuesday, September 18, 2001, at 03:08 PM, Jeffrey J Barbose wrote:
First of all thanks to the folks who gave me a heads-up on using
NSFileHandle to talk to serial ports.
the problems i'm having now:
I get a filedescriptor from the serial port (in my test case, the
internal modem).
i call initFromFileDescriptor: and get an NSFileHandle.
then: [fileHandle writeData:data];
and immediately receivedData = [fileHandle readToEndOfFile];
if i run this straight through with no breakpoints until after these
calls, i hit my breakpoint and get no data back.
if i set a breakpoint on the readToEndOfFile and then step past it, i
get the expected "AT OK", ostensibly because enough time has passed.
i've also tried using the async calls after properly setting up an
observer selector (i've tested with by manually posting a
notification), but i never get notified from a
readToEndOfFileInBackgroundAndNotify.
am i missing something in particular, that someone more comfortable
with i/o might see ?
thanks in advance,
jeff
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev