diff options
author | Shauren <shauren.trinity@gmail.com> | 2014-07-27 14:59:46 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2014-07-27 14:59:46 +0200 |
commit | e77c0b6ed4516c09c648a6443b054b8b9e1edcf1 (patch) | |
tree | 68fdd1e6a6995f211292b494c7352ed207fe1a7c /src/server/authserver/Server/AuthSession.h | |
parent | 6699d969f3114b60109288caebee7b5d7d86b61e (diff) |
Core/Network: Allow storing any packet types in Socket write queue to reduce the amount of copying going on
Diffstat (limited to 'src/server/authserver/Server/AuthSession.h')
-rw-r--r-- | src/server/authserver/Server/AuthSession.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/server/authserver/Server/AuthSession.h b/src/server/authserver/Server/AuthSession.h index eedffb86ff8..822f3c334fc 100644 --- a/src/server/authserver/Server/AuthSession.h +++ b/src/server/authserver/Server/AuthSession.h @@ -22,16 +22,17 @@ #include "Common.h" #include "Socket.h" #include "BigNumber.h" +#include "ByteBuffer.h" #include <memory> #include <boost/asio/ip/tcp.hpp> using boost::asio::ip::tcp; struct AuthHandler; -class ByteBuffer; -class AuthSession : public Socket<AuthSession> +class AuthSession : public Socket<AuthSession, ByteBuffer> { + typedef Socket<AuthSession, ByteBuffer> Base; public: static std::unordered_map<uint8, AuthHandler> InitHandlers(); @@ -47,8 +48,8 @@ public: AsyncReadHeader(); } - using Socket<AuthSession>::AsyncWrite; - void AsyncWrite(ByteBuffer const& packet); + using Base::AsyncWrite; + void AsyncWrite(ByteBuffer& packet); protected: void ReadHeaderHandler(boost::system::error_code error, size_t transferedBytes) override; |