diff options
| author | Shauren <shauren.trinity@gmail.com> | 2014-07-27 01:26:03 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2014-07-27 01:26:03 +0200 |
| commit | 26715795b4b2711104695fa486d1f49c1401976a (patch) | |
| tree | 704354ebc91089950bf30760b27c70edb1c30258 /src/server/shared/Networking | |
| parent | c1b1ba44ba306ec41a981009f37d265283618d9f (diff) | |
Fixed gcc build
Diffstat (limited to 'src/server/shared/Networking')
| -rw-r--r-- | src/server/shared/Networking/Socket.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/shared/Networking/Socket.h b/src/server/shared/Networking/Socket.h index daefa0d4ad5..676418c27a7 100644 --- a/src/server/shared/Networking/Socket.h +++ b/src/server/shared/Networking/Socket.h @@ -25,9 +25,9 @@ #include <mutex> #include <queue> #include <memory> +#include <functional> #include <boost/asio/ip/tcp.hpp> -#include <boost/asio/placeholders.hpp> -#include <boost/bind.hpp> +#include <boost/asio/write.hpp> using boost::asio::ip::tcp; @@ -44,12 +44,12 @@ public: void AsyncReadHeader() { - _socket.async_read_some(boost::asio::buffer(_readBuffer, _headerSize), boost::bind(&Socket::ReadHeaderHandlerInternal, shared_from_this(), boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); + _socket.async_read_some(boost::asio::buffer(_readBuffer, _headerSize), std::bind(&Socket<T>::ReadHeaderHandlerInternal, this->shared_from_this(), std::placeholders::_1, std::placeholders::_2)); } void AsyncReadData(std::size_t size, std::size_t bufferOffset) { - _socket.async_read_some(boost::asio::buffer(&_readBuffer[bufferOffset], size), boost::bind(&Socket::ReadDataHandlerInternal, shared_from_this(), boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); + _socket.async_read_some(boost::asio::buffer(&_readBuffer[bufferOffset], size), std::bind(&Socket<T>::ReadDataHandlerInternal, this->shared_from_this(), std::placeholders::_1, std::placeholders::_2)); } void ReadData(std::size_t size, std::size_t bufferOffset) @@ -59,7 +59,7 @@ public: void AsyncWrite(std::vector<uint8> const& data) { - boost::asio::async_write(_socket, boost::asio::buffer(data), boost::bind(&Socket::WriteHandler, shared_from_this(), boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); + boost::asio::async_write(_socket, boost::asio::buffer(data), std::bind(&Socket<T>::WriteHandler, this->shared_from_this(), std::placeholders::_1, std::placeholders::_2)); } bool IsOpen() const { return _socket.is_open(); } |
