Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9117597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:55:59+00:00 2026-06-17T04:55:59+00:00

I’ve attempted to write a binding project for this project: https://github.com/tolo/HHServices The Project uses

  • 0

I’ve attempted to write a binding project for this project:
https://github.com/tolo/HHServices

The Project uses the lower level C class : dns_sd.h. I dont know how to import this into my binding project.

All the classes that I need to bind are fine, with the exception of this one:

#import <Foundation/Foundation.h>
#include <dns_sd.h>                       // Note this!

@interface HHServiceSupport : NSObject {
@private
    CFRunLoopRef runLoop;
@protected
    DNSServiceRef sdRef;
}

@property (nonatomic, readonly) DNSServiceRef sdRef;

@property (nonatomic, assign) DNSServiceErrorType lastError;
@property (nonatomic, readonly) BOOL hasFailed;

- (void) doDestroy;
- (void) dnsServiceError:(DNSServiceErrorType)error;

- (void) openConnection;
- (void) closeConnection;

@end

My binding for this looks like:

[BaseType (typeof(NSObject))]
interface HHServiceSupport
{

//    @private
//        CFRunLoopRef runLoop;
//    @protected
//        DNSServiceRef sdRef;


//Do I bind the above??!


//@property (nonatomic, readonly) DNSServiceRef sdRef;
[Export("sdRef")]
DNSServiceRef SDRef { get; set; }

//@property (nonatomic, assign) DNSServiceErrorType lastError;
[Export("lastError")]
DNSServiceErrorType LastError { get; set; }

//@property (nonatomic, readonly) BOOL hasFailed;
[Export("hasFailed")]
bool HasFailed { get; set; }

 //- (void) doDestroy;
[Export("doDestroy")]
void  DoDestroy();

//- (void) dnsServiceError:(DNSServiceErrorType)error;
[Export("dnsServiceError:")]
void  DnsServiceError(DNSServiceErrorType error);

//- (void) openConnection;
[Export("openConnection")]
void  OpenConnection();

//- (void) closeConnection;
[Export("closeConnection")]
void  CloseConnection();

}

Because I dont know how to reference the c library dns_sd.h, I dont have any reference to classes such as DNSServiceRef, DNSServiceErrorType and so on and so the library wont build (saying these are unknown).

I’ve looked through all the documentation online regarding this, but dont find anything that refers to how to reference native c libraries.

The closest similar question I can find regarding this is: Referring to DNSSDObjects in dns_sd.h and DNSServiceResolve in MonoTouch which is unanswered.

Any assistance would be greatly appreciated.

ps: My ultimate goal is to enable peer to peer Bonjour so I can make a TCP socket connection between devices, instead of using GameKit, because that’s just a disaster.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T04:56:00+00:00Added an answer on June 17, 2026 at 4:56 am

    While it’s not a direct answer to my question, iOS6 now allows you publish Bonjour on p2p networks (Bluetooth), negating the need to wrap my own DNSSDObjects.

    From Apple’s iOS6 Release Notes:

    Bonjour
    The NSNetService class and CFNetService APIs do not include P2P interfaces by default. To browse, register, or resolve services over P2P interfaces, an app needs to use the Bonjour DNSService*() APIs noted below.
    Setting the interfaceIndex parameter to kDNSServiceInterfaceIndexAny in the following APIs will not include P2P interfaces by default. To include P2P interfaces, you must now set the kDNSServiceFlagsIncludeP2P flag when using kDNSServiceInterfaceIndexAny, or set interfaceIndex to kDNSServiceInterfaceIndexP2P.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm not entirely sure how I managed to jack this up. http://pretty-senshi.com If you
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I am doing a simple coin flipping experiment for class that involves flipping a
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
This could be a duplicate question, but I have no idea what search terms

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.