Re: TCP sockets with Bonjour-discovered address
Re: TCP sockets with Bonjour-discovered address
- Subject: Re: TCP sockets with Bonjour-discovered address
- From: Carl Hoefs <email@hidden>
- Date: Tue, 01 Jul 2014 16:08:11 -0700
Ah, yes! The scope id! Got it working now. But I think you're both correct about using CFNetwork/CFStream in the long run. Was just trying to get old code working, but it will eventually become more cumbersome. Will have to sit down with the docs and try to figure it all out.
Thx!
-Carl
On Jul 1, 2014, at 3:51 PM, Josh Graessley <email@hidden> wrote:
>
> If you’re using IPv6 link-local addresses, you’ll also need the scope id. It’s better to use a connect-by-name API if you have a .local name and let the system take care of resolving that to an address and connecting. When CFNetwork connects by name, it sets the scope id for you.
>
> -josh
>
>> On Jul 1, 2014, at 3:47 PM, Jens Alfke <email@hidden> wrote:
>>
>> Why are you using POSIX APIs to connect? It would be much easier with CFStream/NSStream. (The kind of problem you’re running into here is an example of why I avoid the POSIX APIs whenever possible.)
>>
>> I think the appropriate function to call would be CFStreamCreatePairWithPeerSocketSignature.
>>
>> —Jens
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Macnetworkprog mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden