Fixed gcc build
This commit is contained in:
@@ -16,11 +16,8 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/asio/write.hpp>
|
||||
#include <AuthSession.h>
|
||||
#include <Log.h>
|
||||
#include "AuthSession.h"
|
||||
#include "Log.h"
|
||||
#include "ByteBuffer.h"
|
||||
#include "AuthCodes.h"
|
||||
#include "Database/DatabaseEnv.h"
|
||||
@@ -28,6 +25,7 @@
|
||||
#include "openssl/crypto.h"
|
||||
#include "Configuration/Config.h"
|
||||
#include "RealmList.h"
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
using boost::asio::ip::tcp;
|
||||
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <boost/asio/write.hpp>
|
||||
#include <boost/asio/read_until.hpp>
|
||||
#include <memory>
|
||||
#include "WorldSocket.h"
|
||||
#include "ServerPktHeader.h"
|
||||
@@ -28,7 +26,6 @@
|
||||
#include "PacketLog.h"
|
||||
|
||||
using boost::asio::ip::tcp;
|
||||
using boost::asio::streambuf;
|
||||
|
||||
WorldSocket::WorldSocket(tcp::socket&& socket)
|
||||
: Socket(std::move(socket), sizeof(ClientPktHeader)), _authSeed(rand32()), _OverSpeedPings(0), _worldSession(nullptr)
|
||||
|
||||
@@ -25,11 +25,8 @@
|
||||
#include "Util.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
#include <memory>
|
||||
#include <chrono>
|
||||
#include <mutex>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
#include <boost/asio/streambuf.hpp>
|
||||
|
||||
using boost::asio::ip::tcp;
|
||||
|
||||
@@ -54,7 +51,6 @@ public:
|
||||
void Start() override;
|
||||
|
||||
void AsyncWrite(WorldPacket const& packet);
|
||||
|
||||
using Socket<WorldSocket>::AsyncWrite;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -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(); }
|
||||
|
||||
Reference in New Issue
Block a user