NSFileHandle, Serial & Async...
NSFileHandle, Serial & Async...
- Subject: NSFileHandle, Serial & Async...
- From: Jeffrey J Barbose <email@hidden>
- Date: Tue, 18 Sep 2001 14:08:14 -0700
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 write
Data: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