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

OTBind + Serial Endpoint


  • Subject: OTBind + Serial Endpoint
  • From: Jiri Volejnik <email@hidden>
  • Date: Tue, 27 Aug 2002 11:40:35 +0200

Hi,
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?
Thanks,
Jiri.

Here is the source:

bool
CSerialPort::Open()
{
OSStatus err = noErr;
TEndpointInfo info;
OTConfigurationRef config = ::OTCreateConfiguration(mPortName.c_str());
mEndpoint = ::OTOpenEndpointInContext(config, 0, &info, &err, nil);
if (err != noErr) {
return false;
}

TBind bind;
bind.addr.maxlen = bind.addr.len = 0;
bind.addr.buf = nil;
bind.qlen = 0;

err = mEndpoint->Bind(&bind,nil);
if (err != noErr) {
mEndpoint->Close();
mEndpoint = nil;
}

return mEndpoint != nil;
}
_______________________________________________
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: OTBind + Serial Endpoint
      • From: Quinn <email@hidden>
  • Prev by Date: Re: gethostbyname under 10.2
  • Next by Date: Re: OTBind + Serial Endpoint
  • Previous by thread: Re: gethostbyname under 10.2
  • Next by thread: Re: OTBind + Serial Endpoint
  • Index(es):
    • Date
    • Thread