Re: Unbinding an endpoint in OT when running in Classic -- solved.
Re: Unbinding an endpoint in OT when running in Classic -- solved.
- Subject: Re: Unbinding an endpoint in OT when running in Classic -- solved.
- From: Graham Parkinson-Morgan <email@hidden>
- Date: Mon, 19 Apr 2004 11:41:37 -0700
On Apr 19, 2004, at 1:46 AM, Quinn wrote:
At 15:13 -0700 15/4/04, Justin Walker wrote:
Typically, and I believe OT uses this convention, a bind() with a
zero port tells the kernel (or the port-assigner) that it should
allocate an unused port in what's called the "ephemeral range" (the
high end of the port number space). That way, your app will not have
to scan for an unused port.
Yep. You can discover the port that actually was used by passing
TBind to the retAddr parameter of OTBind.
Passing 0 to the port number of a bind request is both legal and, in
many cases, the correct behaviour. I have no idea why it would cause
port reuse problems. I'd appreciate it if you could file a bug
report, including a copy of your tiny test program.
The (current) documentation from the developer website says to pass nil
as the binding address if you want an unused port automatically
assigned. I haven't come across (current) documentation saying passing
port 0 is legal/correct (not that I doubt that this is true).
I find that passing port 0, or calling OTBind(endpoint,nil,nil),
produces the same result (Classic grip of death on port).
I have sent the tiny test program in a bug report as you suggested.
ALAP are placing bets as to whether this turns out to be my lack of
networking savvy or a real Apple bug. Needless to say they are betting
heavily against me :)
G.
_______________________________________________
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.