Boost logo

Boost :

From: dmoore99atwork (dmoore_at_[hidden])
Date: 2002-02-27 13:55:43


--- In boost_at_y..., Iain.Hanson_at_u... wrote:
> The following is the interface for a unicast address in psudo
code.
> I'm not that enamoured by the names of the mutator and
accessor
> methods so if anyone has better suggestions they would be
welcome. I'd
> appreciate comments, is this interface complete ? is it too
fat? etc.
>

If you need it to interoperate with the "C" sockets API, you need
something along the lines of

operator const sockaddr *() const;
-or-
operator const protocol_address_representation *() const;

-and-
size_t length() const;

You *may* also want to provide mutator and accessor access to the
address family member of the structure, although if I recall from
your earlier posts, that would be a template parameter to the class
in your design, right?

Dave


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk