Re: OTConnect() returns kOTOutStateErr
Re: OTConnect() returns kOTOutStateErr
- Subject: Re: OTConnect() returns kOTOutStateErr
- From: Quinn <email@hidden>
- Date: Thu, 17 Feb 2005 10:20:27 +0000
At 21:37 +0530 16/2/05, Gaurish Kshirsagar wrote:
Is there anything else that I can try?
Sorry I didn't respond earlier but I read your email and mistook
kOTOutStateErr (easy fix) with kOTStateChangedErr (more challenging).
The reason that you're getting kOTOutStateErr is that you haven't
called OTBind. OT, being derived from XTI, requires you to bind,
even for outgoing connections. You can do this trivially, by
inserting:
err = OTBind(ep, NULL, NULL);
between the OpenEndpoint and the Connect.
This is illustrated by a variety of OT samples on the Apple developer web site.
btw You wrote
I'm using the Open Transport API as that is the only networking API
available with my developmentenvironment.
What development environment restricts you to only using OT? The OT
API is deprecated, which means that strongly recommend you developers
not write new code using this API.
Share and Enjoy
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden