Technical Q&ANW 29 - Aborting an OTConnect in Progress (14-May-96)Q I'd like my network client software to be able to abort an asynchronous OTConnect in progress -- to allow a user, for example, to recover from an attempted connection to a nonexistent IP address. I've been calling OTSndDisconnect to abort it, but when I check the return code, I get a kOTOutStateErr. What gives? A Using a OTSndDisconnect is the proper way to abort an OTConnect in progress. After successfully calling OTConnect, the endpoint state will transition from T_IDLE to T_OUTCON. Calling SndDisconnect returns the endpoint state to T_IDLE. You may be getting a kOTOutStateErr for the following reasons:
A good rule of thumb is to always confirm the endpoint state before doing the OTSndDisconnect to insure that the endpoint isn't already disconnected. Technical Q&A Previous Question | Contents | Next Question |