30#ifndef HORIZON_SOCKET_AUTHSOCKET_HPP
31#define HORIZON_SOCKET_AUTHSOCKET_HPP
36#include <boost/asio/ip/tcp.hpp>
39using boost::asio::ip::tcp;
51 explicit AuthSocket(uint64_t uid, std::shared_ptr<tcp::socket> socket);
54 virtual void start()
override;
59 void set_session(std::shared_ptr<AuthSession> session);
Definition: AuthSocket.hpp:47
bool update() override
Asynchronous update method periodically called from network threads.
Definition: AuthSocket.cpp:103
~AuthSocket()
Definition: AuthSocket.cpp:48
void update_session(uint32_t diff)
Packets are processed within the session associated with this socket.
Definition: AuthSocket.cpp:156
void on_close() override
Socket cleanup method on connection closure.
Definition: AuthSocket.cpp:81
void on_error() override
Method invoked when an error occured during a read operation on the socket.
Definition: AuthSocket.cpp:93
std::shared_ptr< AuthSession > _session
Definition: AuthSocket.hpp:69
std::shared_ptr< AuthSession > get_session()
@thread created by network thread and called from main thread / client-sockt-mgr for update().
Definition: AuthSocket.cpp:56
Socket< AuthSocket > BaseSocket
Definition: AuthSocket.hpp:48
void set_session(std::shared_ptr< AuthSession > session)
Definition: AuthSocket.cpp:57
virtual void start() override
Initial method invoked once from the network thread that handles the AuthSocket.
Definition: AuthSocket.cpp:63
AuthSocket(uint64_t uid)
Definition: AuthSocket.cpp:38
void read_handler() override
Read handler for when a message is read from the network and placed within this socket's message buff...
Definition: AuthSocket.cpp:116
A Socket object that handles a single connection.
Definition: Socket.hpp:82
Definition: Element.hpp:7