Merge branch 'master' of ssh://git.carlh.net/home/carl/git/dcpomatic
[dcpomatic.git] / src / lib / dcpomatic_socket.cc
index d575e323027a4e77ed14afa9802d8ae1e82c657f..adba746fe5a15ac20ae221031de8d09917e8ddcf 100644 (file)
@@ -22,6 +22,7 @@
 #include "exceptions.h"
 #include <boost/bind.hpp>
 #include <boost/lambda/lambda.hpp>
+#include <iostream>
 
 #include "i18n.h"
 
@@ -78,7 +79,7 @@ Socket::write (uint8_t const * data, int size)
        boost::system::error_code ec = boost::asio::error::would_block;
 
        boost::asio::async_write (_socket, boost::asio::buffer (data, size), boost::lambda::var(ec) = boost::lambda::_1);
-       
+
        do {
                _io_service.run_one ();
        } while (ec == boost::asio::error::would_block);
@@ -110,7 +111,7 @@ Socket::read (uint8_t* data, int size)
        do {
                _io_service.run_one ();
        } while (ec == boost::asio::error::would_block);
-       
+
        if (ec) {
                throw NetworkError (String::compose (_("error during async_read (%1)"), ec.value ()));
        }
@@ -123,4 +124,3 @@ Socket::read_uint32 ()
        read (reinterpret_cast<uint8_t *> (&v), 4);
        return ntohl (v);
 }
-