Anybody know where to find this information?
Anybody know where to find this information?
- Subject: Anybody know where to find this information?
- From: Dakidd <email@hidden>
- Date: Tue, 27 Apr 2004 08:34:35 -0700
I'm coding a Carbon-targeted, OpenTransport-based networking client using
TCP/IP as my transport, that needs to open a connection. (As if a network
client wouldn't need to do something like that...)
After doing all the setup needed (InitOpenTransportInContext()
OTOpenEndpopintInContext(), DNS lookups as needed, OTInitInetAddress(),
OTBind(), etc, etc, etc, etc., all with kOTNoErr results) I'm getting back
the result "kOTLookErr" from the OTConnect() call. Not a big problem...
I've managed to figure out that this means I should call
OTLook(TheEndpointRef) to retrieve the event that happened on the endpoint.
Having found that information (The event is "T_DISCONNECT" - Event code
0x0010), I find that I now need to call OTRcvDisconnect(TheEndpointRef,
&A_TDisconStruct) to retrieve the "why did it disconnect, how can the
problem be fixed (if it can), etc." information. This gives me back
A_TDisconStruct.reason == 61. So I go hunting for an explanation of what
this result means.
Under the discussion of the TDiscon type in the "Networking with
OpenTransport" PDF (Dated 1997), I see the following remarks on the
"reason" field:
<Copy/Paste>
reason: A 32-bit value specifying an error code that identifies the
reason for the disconnection. These codes are supplied by
the protocol. For additional information, consult the
documentation provided for the protocol you are using.
</Copy/Paste>
Not bad information, certainly, but it doesn't answer the important
question: Why did the connection I was attempting to make get disconnected?
Did I do something wrong? Did the other end refuse to "pick up"? Maybe the
host no longer exists, or isn't running the server software that it's
supposed to be running? Perhaps it IS there, and IS running the software I
think it is, but it's a version that my code can't talk to, so it's
refusing to pick up? Is my connection attempt malformed or otherwise
invalid? Maybe I didn't hold my mouth right while waving the dead chicken
over it? Or was it deciding to use the blue candles, rather than the
regulation black ones when I killed the chicken? <shrug> Dunno... could be
ANY of those reasons, or none of them, or several of them, plus others I
can't even dream up, or...
So I go hunting through the sections of the PDF that deal with the TCP/IP
protocol, hoping to find the "english translation" of the "61" reason code.
And come up totally blank after about 45 minutes of searching. Nothing to
be found in what seem to be the relevant .h files, or the Carbon-oriented
"Open_transport.pdf" file dated 2003, either. Looks like it could actually
be the way I went about waving the dead chicken, for all the facts I have
to go on.
Anybody able to point me at what I'm apparently missing? Or is this simply
one more item on what seems to be the ever-growing list of critical
deficiencies in Apple's documentation?
(Note for those of you who might attempt to reply to me directly, rather
than through the list: Please insert the text "PopperAndShadow" (Space- and
case-sensitive, quotes optional) somewhere in the subject line, or your
reply is all but guaranteed to get trashed as spam by the extremely
draconian anti-spam measures I've been forced to implement to keep my email
box at all useful. on-list replies will get through fine, since I've got
list mailings whitelisted, but unless I've got *YOU* whitelisted, your
direct-to-me message will probably be lost before I see it.)
Message CC-ed to the Carbon-development list to increase potential
viewers/answerers.
Don Bruder - email@hidden <--- Preferred Email - unmunged
I will choose a path that's clear: I will choose Free Will! - N. Peart
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.