Core/NetworkIO: Allow receiving packets bigger than buffer size and properly handle situations where not entire packet was read in one go
Core/Authserver: Restored authenticator functionality
This commit is contained in:
1 parent
91053d557c
commit
df11916ad5
9 files changed
+289
-149
No files matched your search
@@ -17,11 +17,16 @@
|
||||
*/
|
||||
|
||||
#include "ByteBuffer.h"
|
||||
#include "MessageBuffer.h"
|
||||
#include "Common.h"
|
||||
#include "Log.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
ByteBuffer::ByteBuffer(MessageBuffer&& buffer) : _rpos(0), _wpos(0), _storage(buffer.Move())
|
||||
{
|
||||
}
|
||||
|
||||
ByteBufferPositionException::ByteBufferPositionException(bool add, size_t pos,
|
||||
size_t size, size_t valueSize)
|
||||
{
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
#include <math.h>
|
||||
#include <boost/asio/buffer.hpp>
|
||||
|
||||
class MessageBuffer;
|
||||
|
||||
// Root of ByteBuffer exception hierarchy
|
||||
class ByteBufferException : public std::exception
|
||||
{
|
||||
@@ -82,14 +84,12 @@ class ByteBuffer
|
||||
}
|
||||
|
||||
ByteBuffer(ByteBuffer&& buf) : _rpos(buf._rpos), _wpos(buf._wpos),
|
||||
_storage(std::move(buf._storage))
|
||||
{
|
||||
}
|
||||
_storage(std::move(buf._storage)) { }
|
||||
|
||||
ByteBuffer(ByteBuffer const& right) : _rpos(right._rpos), _wpos(right._wpos),
|
||||
_storage(right._storage)
|
||||
{
|
||||
}
|
||||
_storage(right._storage) { }
|
||||
|
||||
ByteBuffer(MessageBuffer&& buffer);
|
||||
|
||||
ByteBuffer& operator=(ByteBuffer const& right)
|
||||
{
|
||||
|
||||
@@ -51,6 +51,8 @@ class WorldPacket : public ByteBuffer
|
||||
return *this;
|
||||
}
|
||||
|
||||
WorldPacket(uint16 opcode, MessageBuffer&& buffer) : ByteBuffer(std::move(buffer)), m_opcode(opcode) { }
|
||||
|
||||
void Initialize(uint16 opcode, size_t newres=200)
|
||||
{
|
||||
clear();
|
||||
|
||||
Reference in new issue
Block a user