30#ifndef HORIZON_ZONE_ZONESOCKET_HPP
31#define HORIZON_ZONE_ZONESOCKET_HPP
35using boost::asio::ip::tcp;
46 ZoneSocket(uint64_t uid, std::shared_ptr<tcp::socket> socket);
49 void start()
override;
54 void set_session(std::shared_ptr<ZoneSession> session);
A Socket object that handles a single connection.
Definition: Socket.hpp:82
declared to avoid recursive inclusion of header files.
Definition: ZoneSocket.hpp:43
std::shared_ptr< ZoneSession > get_session()
Session dependency.
Definition: ZoneSocket.cpp:48
void start() override
Initial method invoked once from the network thread that handles the ZoneSocket.
Definition: ZoneSocket.cpp:54
std::shared_ptr< ZoneSession > _session
Definition: ZoneSocket.hpp:60
void on_error() override
Socket error handler.
Definition: ZoneSocket.cpp:88
~ZoneSocket()
Definition: ZoneSocket.hpp:47
Socket< ZoneSocket > BaseSocket
Definition: ZoneSocket.hpp:44
bool update() override
Asynchronous update method periodically called from network threads.
Definition: ZoneSocket.cpp:101
ZoneSocket(uint64_t uid, std::shared_ptr< tcp::socket > socket)
Definition: ZoneSocket.cpp:37
void set_session(std::shared_ptr< ZoneSession > session)
Definition: ZoneSocket.cpp:49
void on_close() override
Socket cleanup method on connection closure.
Definition: ZoneSocket.cpp:74
void read_handler() override
Incoming buffer read handler.
Definition: ZoneSocket.cpp:109
Definition: Element.hpp:7