Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about retrieving port numbers



I am not sure what you want to use it for or how familiar you are will
cocoa or objective c but the netservice class makes rendezvous easy
for Mac OS X. There is a great tutorial at
http://www.macdevcenter.com/pub/a/mac/2002/11/08/cocoa.html It is a
two part tutorial and the second one in gets more into the meat of
netservice. The mDNSPosix code makes a lot more work. So if you can
get away with using cocoa a demo could be thrown together in a few
minutes.

Christian

On Fri, 16 Jul 2004 02:48:19 -0700 (PDT), email@hidden
<email@hidden> wrote:
> I should add that I'm running on Mac OS X using the mDNSPosix code.
> 
> Thank you, I'll give that a try.
> 
> _ michael
> 
> 
> 
> >> I am new to Rendezvous and am trying to whip up a
> > demo to show
> >> internally in my company.
> >>
> >> Currently, the code only prints out the name,
> > service type, and
> >> domain and tries to print out the IP and Port. The
> > ip and port and
> >> nowhere near the values that I registered the
> > service with so I can
> >> only assume I'm doing something wrong. Can you help
> > me pinpoint > that?
> >
> > I'm new here too, but my first instinct is you're
> > getting bitten by endian issues. I think the
> > Rendezvous API is returning stuff in network order, so
> > you need to convert to hostmachine order.
> >
> > Look into ntohs() and ntohl().
> >
> > printf("Port: %d\n",
> > ntohs(answer->rdata->u.srv.port));
> >
> > Hope this helps,
> > -Eric
> > _______________________________________________
> > rendezvous mailing list | email@hidden
> > Help/Unsubscribe/Archives:
> > http://www.lists.apple.com/mailman/listinfo/rendezvous
> > Do not post admin requests to the list. They will be ignored.
> _______________________________________________
> rendezvous mailing list | email@hidden
> Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/rendezvous
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
rendezvous mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/rendezvous
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: Question about retrieving port numbers (From: Eric Wing <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.