• 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: Question about friendly exits
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about friendly exits


  • Subject: Re: Question about friendly exits
  • From: Quinn <email@hidden>
  • Date: Mon, 11 Mar 2002 10:41:46 +0000

At 14:36 -0500 10/3/02, email@hidden wrote:
I started digging deeper into my problem after I sent my response. It seems
that my call to InitOpenTransportInContext and OTAsyncOpenEndpointInContext
have no errors when trying again after a crash. It's my call to OTSndUData
that returns an error code of -3155? This is basically the same issue I had
when I was linking to the wrong LIBs. Is there something in the setup I could
be doing incorrectly?

Error -3155 is kOTOutStateErr. This usually happens when you try to call an OT routine with the endpoint in the wrong state. For example, if you try to call OTSndUData when the endpoint still isn't bound. Have you checked the error result from OTBind to make sure that it's binding correctly. One possible scenario here is as follows:

1. The first time you run the program you bind to port X.
2. You quit and run again.
3. Your program tries to bind to port X and fails because of
IP_REUSEADDR problems.
4. Your program doesn't notice this error and calls OTSndUData anyway.

If you're binding to a specific port you should probably set IP_REUSEADDR before you attempt to bind. This is explained in more detail in DTS Q&A NW 28.

<http://developer.apple.com/qa/nw/nw28.html>

S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
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.

References: 
 >Re: Question about friendly exits (From: email@hidden)

  • Prev by Date: Re: Question about friendly exits
  • Next by Date: Re: Location Manager support ?
  • Previous by thread: Re: Question about friendly exits
  • Next by thread: Can't see "localhost" machine when sending UDP broadcast on OS X
  • Index(es):
    • Date
    • Thread