From: dmoore99atwork (dmoore_at_[hidden])
Date: 2002-01-22 08:29:14
> I do have a couple of questions for other people who have spent
time thinking on this problem...
I forgot one!
5. In the requirements document, it is suggested that since platform
header files for socket APIs are notorious for poor macro practices
like redefining "send", etc., that these headers should never be
included by any Boost socket headers that are a part of the public
interface. I understand the rationale, but... Wrapper classes for
in_addr and sockaddr_in would need to use heap allocation for their
wrapped structures. Is this worth it? I'm leaning towards "yes", as
the heap allocation doesn't seem to be anything to be afraid of,
except perhaps in busy servers....
Example using platform headers in interface header:
Example not including platform socket API
// don't know size, so can only point to the forward declared
socket_address() : _paddr(new sockaddr_in);
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk