mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-14 09:36:41 +02:00
xxx
git-svn-id: svn://elaine/murooma/trunk@154 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
01b887df45
commit
a1487e5081
2 changed files with 21 additions and 5 deletions
|
@ -62,7 +62,13 @@ public:
|
|||
{
|
||||
shared_ptr<WireChunk> chunk(chunks.pop());
|
||||
boost::system::error_code error;
|
||||
boost::asio::write(*socket_, boost::asio::buffer(chunk.get(), sizeof(WireChunk)), boost::asio::transfer_all(), error);
|
||||
size_t written = 0;
|
||||
do
|
||||
{
|
||||
written += boost::asio::write_some(*socket_, boost::asio::buffer(chunk.get() + written, sizeof(WireChunk) - written), error);
|
||||
}
|
||||
while (written < sizeof(WireChunk));
|
||||
|
||||
if (error == boost::asio::error::eof)
|
||||
break; // Connection closed cleanly by peer.
|
||||
else if (error)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue