From: Glyn M. <gly...@gm...> - 2010-01-22 19:20:47
|
Hi Erik, 2010/1/22 Nelson, Erik - 2 <eri...@ba...> > Thanks for the help... It's working now, and I'm playing with it some > more. > > I'm not sure if it matters, but in connection.hpp, in the connection > constructor, there's a bit of code like > > try { > socket_.set_option(tcp::no_delay(true)); // Don't delay > writing > } catch (system::system_error & e) { > handler_.log(e.what()); > } > > And the set_option call *always* seems to throw > boost::asio::error::bad_descriptor. Not sure if it matters. > > One other thing I noticed (and don't personally care about) is the > cpp-netlib coding style, like curly brace placement. I'm not sure if > there are boost coding guidelines or not, or if they are enforced or > not, but cpp-netlib looks a little different than other boost source > code. Again, I'm perfectly happy with however it is, but if the goal is > to move cpp-netlib into boost and boost cares (I don't know that either > of those assumptions are true), it's probably easier to start doing it > "the boost way" sooner rather than later. > > There isn't really a "boost way", I think, the closest it gets is in the guidelines: http://www.boost.org/development/requirements.html But that stops short of specifying how the source code should be formatted, but focuses on portability and license issues. Different boost libraries seem to be formatted differently, depending on each author's preferences. The coding style sometimes bothers me too (not so much curly braces placement as indenting), but I get that all the time when I look at other people's code ;) If you think its a going to be a hindrance then perhaps we could open a discussion about guidelines. Maybe consistency would be important at least, because this project could potentially be large and the nature of the design doesn't lend itself to highly readable code. Glyn |