Re: CFSocketSignature & IPv6 addresses
Re: CFSocketSignature & IPv6 addresses
- Subject: Re: CFSocketSignature & IPv6 addresses
- From: Douglas Davidson <email@hidden>
- Date: Fri, 27 May 2005 10:28:57 -0700
On May 27, 2005, at 10:07 AM, OL&L Lists wrote:
http://developer.apple.com/documentation/CoreFoundation/Reference/
CFSocketRef/Reference/chapter_1.5_section_1.html
"A CFData object holding the contents of a struct sockaddr
appropriate for the given protocol family, identifying the address
of the socket."
Notice that it says "a struct sockaddr", not "a struct sockaddr_in".
This is because it is intended to hold any variety of sockaddr, not
merely that for IPv4.
However, you cannot put a CFSocketSignature into a CFDictionary,
because it is a struct and not a CFType. You can, however, place
the address CFDataRef into a CFDictionary, and it may be
sufficient for your needs.
OK so in that case what is the easiest and quickest way to store
all this data in a CFDictionary? I need to send *all* the socket
info to my helper tool, not just the address info.
I am not sure what you think of as easy and quick, but one way would
be to store the family, type, and protocol as CFNumbers in an array
or dictionary; another, that I have used myself sometimes, would be
to create a new CFData containing the family, type, and protocol
followed by the sockaddr.
Douglas Davidson
_______________________________________________
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