• 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: OTBind + Serial Endpoint
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OTBind + Serial Endpoint


  • Subject: Re: OTBind + Serial Endpoint
  • From: Quinn <email@hidden>
  • Date: Tue, 27 Aug 2002 10:56:42 +0100

At 11:40 +0200 27/8/02, Jiri Volejnik wrote:
I'm writing simple serial port wrapper under Carbon (therefore using OT),
and have a problem with OTBind. It returns kOTBadAddressErr, even thought
Serial Endpoints don't use the address.
Anyone can see the reason?

This is because you haven't initialised the len field bind.addr. When dealing with TNetbuf, you have to initialise len and buf for input parameters (such as the second parameter to OTBind), and maxlen and buf for output parameters (such as the third parameter to OTBind).

However, for OTBind there's an easier way. When binding serial endpoints (and indeed any outgoing connections), just pass NULL to both the second and third parameters.

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: 
 >OTBind + Serial Endpoint (From: Jiri Volejnik <email@hidden>)

  • Prev by Date: OTBind + Serial Endpoint
  • Next by Date: Re (2): OTBind + Serial Endpoint
  • Previous by thread: OTBind + Serial Endpoint
  • Next by thread: Re (2): OTBind + Serial Endpoint
  • Index(es):
    • Date
    • Thread