ADC Home > Reference Library > Technical Q&As > Legacy Documents > Networking >
Legacy Document
Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.
Current information on this Reference Library topic can be found here:
Technical Q&A PLAT04
MacTCP I/O
|
Q: I am having a problem killing MacTCP I/O: I issue
asynchronous MacTCP reads and writes during the operation of my application, and I occasionally need to kill
any outstanding I/O. I'm trying to use the PBKillIO call, giving it the
reference number of the MacTCP driver. According to Inside Macintosh,
PBKillIO should cause all I/O on that driver to complete with an error (cause
any completion routines to fire). Unfortunately, this doesn't seem to work --
my completion routines aren't getting called. To make this happen, I have to
abort the connection instead of calling KillIO , which isn't what I want -- I
need the connection to stay up.
Is there a known problem with PBKillIO and MacTCP?
A: KillIO is not supported by MacTCP, since it only affects PBReads and PBWrites ,
where MacTCP reads and writes are PBControl calls. MacTCP ignores KillIO calls
to the driver (an ioResult of 0 is returned every time). The only way to kill
an outstanding read/write in MacTCP is with TCPAbort . Unfortunately, this means
that you do lose the connection.
|
[May 01 1995]