Subject: [boost] Networking TS + Beast, NEW Tutorials, Read this to learn std::net !!!
From: Mike (mike.dev_at_[hidden])
Date: 2019-03-15 07:24:12
> All in all nice intro, unfortunately it requires users to understand
> templates quite well, but honestly not sure if it is avoidable, with
> gazillion customization points in ASIO.
Anyone aware of a wrapper library around ASIO
that doesn't offer all those customization points
and maybe not the full functionality/ efficiency
but is easier to use?
Am 15.03.19, 01:09, Ivan Matek via Boost <boost_at_[hidden]>
Here are comments from somebody who "knows C++" but does not know a
about NW and has read only the 1st
// get iterators representing the range of characters in the buffer
auto begin = range::begin(buffer.data());
auto end = range::end(buffer.data());
Quite a weird pattern, where buffer does not have member begin, end.
Maybe a sentence or two describing the rationale and complexity
I know it is O(1), but it is weird that begin/end are called on
std::size_t read_lineI am tired, but is this function O(n^2)?
cb += bytes_transferred; // adjust the pointer and sizeI would maybe
switch to write instead of write_some to keep the code shorter, and
mention write_some as another option in text.
(error_code ec, std::size_t bytes_transferred)
For learning purposes I would capture something in lambda by value
note that reference capture would be buggy.
using type = std::allocator<void>;
Personal preference: not a fan of typedefs for relatively short
All in all nice intro, unfortunately it requires users to understand
templates quite well, but honestly not sure if it is avoidable, with
gazillion customization points in ASIO.
Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk