Horizon Official Technical Documentation
Horizon::Char::HC_REFUSE_ENTER Class Reference

Main object for the aegis packet: HC_REFUSE_ENTER. More...

#include <TransmittedPackets.hpp>

+ Inheritance diagram for Horizon::Char::HC_REFUSE_ENTER:
+ Collaboration diagram for Horizon::Char::HC_REFUSE_ENTER:

Public Member Functions

 HC_REFUSE_ENTER (std::shared_ptr< CharSession > s)
 
virtual ~HC_REFUSE_ENTER ()
 
void deliver (hc_char_connect_error_type error)
 HC_REFUSE_ENTER. More...
 
ByteBufferserialize ()
 
- Public Member Functions inherited from Horizon::Base::NetworkPacket< CharSession >
 NetworkPacket (uint16_t packet_id, std::shared_ptr< CharSession > s)
 
virtual ~NetworkPacket ()
 
void set_packet_id (uint16_t id)
 
uint16_t get_packet_id ()
 
ByteBufferbuf ()
 
std::shared_ptr< CharSession > get_session ()
 Retrieves the session from this handler instance. More...
 
virtual void handle (ByteBuffer &&buf)
 
virtual void deserialize (ByteBuffer &buf)
 
void transmit ()
 Send an Asynchronous packet by queueing a buffer of a particular size to the connected session. More...
 
void transmit (std::size_t size)
 Send an Asynchronous packet by queueing a buffer of a particular size to the connected session. More...
 

Public Attributes

hc_char_connect_error_type _error
 

Additional Inherited Members

- Protected Attributes inherited from Horizon::Base::NetworkPacket< CharSession >
ByteBuffer _buffer
 Buffer storage facility for the packet stream. More...
 
uint16_t _packet_id
 ID of the network packet. More...
 

Detailed Description

Main object for the aegis packet: HC_REFUSE_ENTER.

Constructor & Destructor Documentation

◆ HC_REFUSE_ENTER()

Horizon::Char::HC_REFUSE_ENTER::HC_REFUSE_ENTER ( std::shared_ptr< CharSession s)
inline
1048 : NetworkPacket<CharSession>(ID_HC_REFUSE_ENTER, s)
1049 {}
@ ID_HC_REFUSE_ENTER
Definition: TransmittedPackets.hpp:1022

◆ ~HC_REFUSE_ENTER()

virtual Horizon::Char::HC_REFUSE_ENTER::~HC_REFUSE_ENTER ( )
inlinevirtual
1050{}

Member Function Documentation

◆ deliver()

void HC_REFUSE_ENTER::deliver ( hc_char_connect_error_type  error)

HC_REFUSE_ENTER.

299{
300 _error = error;
301
302 serialize();
303 transmit();
304}
void transmit()
Send an Asynchronous packet by queueing a buffer of a particular size to the connected session.
Definition: NetworkPacket.hpp:94
ByteBuffer & serialize()
Definition: TransmittedPackets.cpp:306
hc_char_connect_error_type _error
Definition: TransmittedPackets.hpp:1056

References _error, serialize(), and Horizon::Base::NetworkPacket< CharSession >::transmit().

Referenced by Horizon::Char::CharClientInterface::authorize_new_connection(), Horizon::Char::CharClientInterface::pincode_verify(), Horizon::Char::CharClientInterface::select_character(), and Horizon::Char::CharClientInterface::update_session().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize()

ByteBuffer & HC_REFUSE_ENTER::serialize ( )
307{
308 buf() << _packet_id;
309 buf() << ((uint8_t)_error);
310 return buf();
311}
uint16_t _packet_id
ID of the network packet.
Definition: NetworkPacket.hpp:87
ByteBuffer & buf()
Definition: NetworkPacket.hpp:59

References _error, Horizon::Base::NetworkPacket< CharSession >::_packet_id, and Horizon::Base::NetworkPacket< CharSession >::buf().

Referenced by deliver().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ _error

hc_char_connect_error_type Horizon::Char::HC_REFUSE_ENTER::_error

Referenced by deliver(), and serialize().


The documentation for this class was generated from the following files: