ADC Home > Reference Library > Technical Q&As > Legacy Documents > Networking >

Legacy Documentclose button

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:

NOTE: This Technical Q&A has been retired. Please see the Technical Q&As page for current documentation.

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]


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.