• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Unbinding an endpoint in OT when running in Classic.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unbinding an endpoint in OT when running in Classic.


  • Subject: Re: Unbinding an endpoint in OT when running in Classic.
  • From: Graham Parkinson-Morgan <email@hidden>
  • Date: Wed, 14 Apr 2004 22:23:10 -0700

Sorry to have to come back to this again, but after further analysis, I'm afraid that my problem with OT in Classic hanging onto a port for grim death did not go away.

To recap: I have a test app that is compiled in three separate configurations:

A: for PPC, using OT.
B: for Carbon using OT.
C: for Mach using Unix and CFSockets.

All three apps are fired up at separate times during testing on OSX 10.3.
The endpoints/sockets are all set up with for UDP protocol with options to IP_REUSEADDR, IP_REUSEPORT, and IP_BROADCAST. Thanks to Justin for indirectly pointing out that I had forgotten the IP_REUSEPORT option for the OpenTransport configurations.
I find that configuration B(Carbon using OT) can be fired up, run, and shutdown as many times as I like and the test port (port 7000) is bound and released happily every time.
The same story for configuration C (Mach), both before and after running configuration B (Carbon using OT).
However, the fly in the ointment is A(PPC, using OT). When I fire this for the first time, Classic launches, port 7000 is bound to the endpoint, the app is run, data is received on that port, the endpoint is unbound, exactly as for configuration B, and I quit the test app. I find that I can relaunch the application and the port, according to Classic, is available: it can be bound, is bound, will receive data, gets unbound, I can quit the app; and this cycle can be repeated for as long as it takes for all to be satisfied that the mechanism works in Classic. All is well until I go back to configuration B or C (at this time, I have quit A). Now, in B, a call to OTBind for port 7000 will return kEADDRINUSEErr: in C(CFSockets & Unix), a call to bind will return -1 with errno = EFAULT. Shutting down Classic will not help: the port is stubbornly unavailable: and remains so for as long as I care to test it ( had supper, came back, checked if anything had timed out, etc). Rebooting OSX, in my complete ignorance, is the only way I have found to restore the beloved port 7000 to its former glory.

I hope, once more, that I have given sufficient info for the combined expertise of this list to come up with the perhaps obvious answer to a puzzle which has eluded me all afternoon.

Graham.
_______________________________________________
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.


  • Follow-Ups:
    • Re: Unbinding an endpoint in OT when running in Classic.
      • From: Justin Walker <email@hidden>
  • Prev by Date: Re: Prefork, Perchild, Worker, Threadpool, Leader
  • Next by Date: Re: Unbinding an endpoint in OT when running in Classic.
  • Previous by thread: Re: Unbinding an endpoint in OT when running in Classic.
  • Next by thread: Re: Unbinding an endpoint in OT when running in Classic.
  • Index(es):
    • Date
    • Thread