diff options
author | Shauren <shauren.trinity@gmail.com> | 2016-02-20 13:08:03 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2016-02-20 13:08:03 +0100 |
commit | b2e03a744813a17bf0c01c9ef010e65cac078420 (patch) | |
tree | 6513a0674f2a07c89b05b089e8d52e8accde68cb /src/server/authserver/Server/AuthSession.cpp | |
parent | d4184065b6d51b250ab08f35e88868cef631ed4b (diff) |
Core/Networking: Rewrite networking threading model
Each network thread has its own io_service - this means that all operations on a given socket except queueing packets run from a single thread, removing the need for locking
Sending packets now writes to a lockfree intermediate queue directly, encryption is applied in network thread if it was required at the time of sending the packet
(cherry picked from commit 97a79af4701621ec04b88c8b548dbc35d120e99e)
Diffstat (limited to 'src/server/authserver/Server/AuthSession.cpp')
-rw-r--r-- | src/server/authserver/Server/AuthSession.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/server/authserver/Server/AuthSession.cpp b/src/server/authserver/Server/AuthSession.cpp index 519cd1f19f7..57e5d6682f2 100644 --- a/src/server/authserver/Server/AuthSession.cpp +++ b/src/server/authserver/Server/AuthSession.cpp @@ -274,10 +274,7 @@ void AuthSession::SendPacket(ByteBuffer& packet) { MessageBuffer buffer; buffer.Write(packet.contents(), packet.size()); - - std::unique_lock<std::mutex> guard(_writeLock); - - QueuePacket(std::move(buffer), guard); + QueuePacket(std::move(buffer)); } } |