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

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

#include <TransmittedPackets.hpp>

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

Public Member Functions

 HC_REFUSE_MAKECHAR (std::shared_ptr< CharSession > s)
 
virtual ~HC_REFUSE_MAKECHAR ()
 
void deliver (hc_char_create_error_type error)
 HC_REFUSE_MAKECHAR. 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_create_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_MAKECHAR.

Constructor & Destructor Documentation

◆ HC_REFUSE_MAKECHAR()

Horizon::Char::HC_REFUSE_MAKECHAR::HC_REFUSE_MAKECHAR ( std::shared_ptr< CharSession s)
inline
1094 : NetworkPacket<CharSession>(ID_HC_REFUSE_MAKECHAR, s)
1095 {}
@ ID_HC_REFUSE_MAKECHAR
Definition: TransmittedPackets.hpp:1072

◆ ~HC_REFUSE_MAKECHAR()

virtual Horizon::Char::HC_REFUSE_MAKECHAR::~HC_REFUSE_MAKECHAR ( )
inlinevirtual
1096{}

Member Function Documentation

◆ deliver()

void HC_REFUSE_MAKECHAR::deliver ( hc_char_create_error_type  error)

HC_REFUSE_MAKECHAR.

316{
317 _error = error;
318
319 serialize();
320 transmit();
321}
void transmit()
Send an Asynchronous packet by queueing a buffer of a particular size to the connected session.
Definition: NetworkPacket.hpp:94
hc_char_create_error_type _error
Definition: TransmittedPackets.hpp:1102
ByteBuffer & serialize()
Definition: TransmittedPackets.cpp:323

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

Referenced by Horizon::Char::CharClientInterface::make_new_character().

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

◆ serialize()

ByteBuffer & HC_REFUSE_MAKECHAR::serialize ( )
324{
325 buf() << _packet_id;
326 buf() << (uint8_t)_error;
327 return buf();
328}
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_create_error_type Horizon::Char::HC_REFUSE_MAKECHAR::_error

Referenced by deliver(), and serialize().


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