From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2003-10-24 23:52:00
"Jessie Hernandez" <jessie_at_[hidden]> wrote in message
> I'd like to get feedback on the current state of the library and see what
> can be improved (I'm mostly interested in the design aspect).
I'm really looking forward to a socket library in boost so I appreciate all
work done in that regard.
Just some quick comments to your example (its hard giving detailed feedback
on the desing when there is no design document):
domain::address_type addr( host<domain>( "www.boost.org" ).address().ip(),
why is it necesary to say host.address().ip() ? why can't a host have an ip
why doesn't the host's template parameter default to ipv4?
I think I might like two typedefs instead: ipv4_host and ipv6_host
I would prefer this was put in the destructor for exception safety reasons
and ease of use.
I have no idea about what the follownig does, the names don't seem very
hostent* boostEnt = ::gethostbyname( "www.boost.org" );
Why all this nesting:
sockstream.rdsocket()->blocking( false );
? I would prefer sockstream.enable_blocking()/disable_blocking() [naming not
Why does rdsocket() return a pointer?
Naming in general; prefer read_socket() to rdsocket(); prefer protocol() to
proto() prefer is_connected() to connected(), set_port() to port()
don't put exception specifications on functions.
Overall I think the usage seems simple.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk