On Wed, Aug 24, 2016 at 9:58 AM Derick Rethans <der...@php.net> wrote:

> On Wed, 24 Aug 2016, David Walker wrote:
>
> > I'd like to open voting on my RFC[1] to implement getaddrinfo().  The
> > RFC implements 4 new socket extension functions to aid in the calling,
> > examining, and connect/binding of the addrinfo structure.
>
> Sorry, I missed this discussion. Is there a reason why addrinfo is a
> resource, and not an object? I realize resources are needed for the
> actual socket, but is it needed for the addrinfo information?
>
> I would also like to see (in the RFC, but certainly in the docs), how
> this works connecting to a specific IPv6 address resource.
>
> cheers,
> Derick
>

I did message internals a couple weeks back about it, was limited
discussion so it was probably missed.

I will be adding the _explain example for bishop, and can add an IPv6
example for you too.

I went with a resource as addrinfo is itself a structure, which has general
information including a pointer to the actual sockaddr to use.  I,
maybe preemptively, assumed the general use-case would be to use the
addrinfo for the sockaddr rather than the general hint-information returned
as well.  As one ought not to care about how I can connect as long as libc
says it should work.  And if you had a specific family, or protocol you
wanted to connect over, you can always provide the hint to get at it.

--
Dave

Reply via email to