mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-23 22:16:16 +02:00
reference stream sessions by weak_ptr
This commit is contained in:
parent
43bc4c26b8
commit
f47d0df9d7
4 changed files with 176 additions and 191 deletions
|
@ -51,6 +51,7 @@ public:
|
|||
|
||||
|
||||
// A reference-counted non-modifiable buffer class.
|
||||
// TODO: add overload for messages
|
||||
class shared_const_buffer
|
||||
{
|
||||
public:
|
||||
|
@ -59,6 +60,18 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
// // Construct from a message.
|
||||
// explicit shared_const_buffer(const msg::BaseMessage& message)
|
||||
// {
|
||||
// std::ostringstream oss;
|
||||
// message.serialize(oss);
|
||||
|
||||
// data_ = std::shared_ptr<std::vector<char>>(new std::vector<char>(oss.str().begin(), oss.str().end()));
|
||||
// //std::make_shared<std::vector<char>>(oss.str().begin(), oss.str().end());
|
||||
// buffer_ = boost::asio::buffer(*data_);
|
||||
// }
|
||||
|
||||
|
||||
// Implement the ConstBufferSequence requirements.
|
||||
typedef boost::asio::const_buffer value_type;
|
||||
typedef const boost::asio::const_buffer* const_iterator;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue