18#ifndef TRINITYCORE_WORLD_SOCKET_H
19#define TRINITYCORE_WORLD_SOCKET_H
29#include <boost/asio/ip/tcp.hpp>
31using boost::asio::ip::tcp;
80 void Start()
override;
92 void SendAuthSession();
95 bool ReadHeaderHandler();
104 ReadDataHandlerResult ReadDataHandler();
109 void LogOpcodeText(
OpcodeClient opcode, std::unique_lock<std::mutex>
const& guard)
const;
111 void SendPacketAndLogOpcode(
WorldPacket const& packet);
113 void HandleAuthSessionCallback(std::shared_ptr<AuthSession> authSession,
PreparedQueryResult result);
115 void SendAuthResponseError(
uint8 code);
std::shared_ptr< PreparedResultSet > PreparedQueryResult
std::chrono::steady_clock::time_point TimePoint
time_point shorthand typedefs
std::conditional_t< IntrusiveLink !=nullptr, Trinity::Impl::MPSCQueueIntrusive< T, IntrusiveLink >, Trinity::Impl::MPSCQueueNonIntrusive< T > > MPSCQueue
bool NeedsEncryption() const
EncryptablePacket(WorldPacket const &packet, bool encrypt)
std::atomic< EncryptablePacket * > SocketQueueLink
virtual SocketReadCallbackResult ReadHandler()
Player session in the World.
MessageBuffer _headerBuffer
WorldSocket(WorldSocket &&right)=delete
MessageBuffer _packetBuffer
QueryCallbackProcessor _queryProcessor
WorldPacketCrypt _authCrypt
std::array< uint8, 4 > _serverChallenge
WorldSocket & operator=(WorldSocket const &right)=delete
std::size_t _sendBufferSize
std::array< uint8, 32 > _dosChallenge
WorldSession * _worldSession
void SetSendBufferSize(std::size_t sendBufferSize)
WorldSocket & operator=(WorldSocket &&right)=delete
MPSCQueue< EncryptablePacket, &EncryptablePacket::SocketQueueLink > _bufferQueue
WorldSocket(WorldSocket const &right)=delete
std::mutex _worldSessionLock
boost::asio::basic_stream_socket< boost::asio::ip::tcp, boost::asio::io_context::executor_type > IoContextTcpSocket