apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject Re: [PATCH] socket family fetching
Date Tue, 01 May 2001 00:15:40 GMT
Jon Travis <jtravis@p00p.org> writes:

> I need a routine to fetch the socket family.  I could just refer
> to the information in the sockaddr_t address length, but that is
> rather hackish.  Anyway, here tis.  We should also probably be
> moving towards making the sockaddr_t an opaque type, or at least
> some of the members.

I definitely vote for a routine to return the family from an
apr_socket_t :)

APR_DECLARE(apr_status_t) apr_socket_family_get(apr_int32_t *family,
                                                apr_socket_t *sock);

apr_socket_t is opaque and you have to use a hokey way to find out the
family currently.  If we could get rid of that need then we could get
rid of the usually-wasted apr_sockaddr_t allocated with the socket.

-- 
Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Mime
View raw message