SEGS  0.4.2
Super Entity Game Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
AuthLink Class Referencefinal

#include <AuthLink.h>

Inheritance diagram for AuthLink:
Inheritance graph
Collaboration diagram for AuthLink:
Collaboration graph

Public Types

typedef ACE_SOCK_Stream stream_type
 
typedef ACE_INET_Addr addr_type
 

Public Member Functions

 AuthLink ()
 
 AuthLink (EventProcessor *target, AuthLinkType link_type=AuthLinkType::Server)
 
 ~AuthLink (void) override
 
int open (void *=nullptr) override
 Called when we start to service a new connection, here we tell reactor to wake us when queue() is not empty. More...
 
int handle_input (ACE_HANDLE) override
 Called when new bytes are available. More...
 
int handle_output (ACE_HANDLE fd=ACE_INVALID_HANDLE) override
 Called from ACEReactor when there are events in our queue() More...
 
int handle_close (ACE_HANDLE handle, ACE_Reactor_Mask close_mask) override
 Called when this handler is removed from the ACE_Reactor. More...
 
void dispatch (SEGSEvent *ev) override
 
stream_typepeer ()
 
addr_typepeer_addr ()
 
void init_crypto (int vers, uint32_t seed)
 
ACE_HANDLE get_handle (void) const override
 
- Public Member Functions inherited from LinkBase
virtual ~LinkBase ()=default
 
uint64_t session_token () const
 
void session_token (uint64_t tok)
 
- Public Member Functions inherited from EventProcessor
int open (void *args=nullptr)
 
int handle_timeout (const ACE_Time_Value &current_time, const void *act)
 
virtual bool per_thread_setup ()
 

Protected Member Functions

bool send_buffer ()
 
void encode_buffer (const AuthLinkEvent *ev, size_t start)
 
void set_protocol_version (int vers)
 
eAuthPacketType OpcodeToType (uint8_t opcode) const
 Convert opcode byte to corresponding packet type. More...
 
SEGSEventbytes_to_event ()
 tries to convert the available bytes into a valid AuthHandler LinkLevelEvent. More...
 

Protected Attributes

EventProcessorm_target
 
AuthPacketCodec m_codec
 
GrowingBuffer m_received_bytes_storage
 Each link stores incoming bytes locally. More...
 
GrowingBuffer m_unsent_bytes_storage
 Each link stores outgoing bytes locally. More...
 
tNotifyStrategy m_notifier
 Our message queue will use this to wake up the reactor on new elements. More...
 
stream_type m_peer
 Underlying client connection object. More...
 
addr_type m_peer_addr
 
ACE_Thread_Mutex * m_buffer_mutex
 
int m_protocol_version
 
eState m_state
 
AuthLinkType m_direction
 

Friends

class AuthHandler
 

Member Typedef Documentation

typedef ACE_INET_Addr AuthLink::addr_type
typedef ACE_SOCK_Stream AuthLink::stream_type

Member Function Documentation

ACE_HANDLE AuthLink::get_handle ( void  ) const
inlineoverride
stream_type& AuthLink::peer ( )
inline
addr_type& AuthLink::peer_addr ( )
inline

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class AuthHandler
friend

Member Data Documentation

ACE_Thread_Mutex* AuthLink::m_buffer_mutex
protected
AuthPacketCodec AuthLink::m_codec
protected
AuthLinkType AuthLink::m_direction
protected
tNotifyStrategy AuthLink::m_notifier
protected

Our message queue will use this to wake up the reactor on new elements.

stream_type AuthLink::m_peer
protected

Underlying client connection object.

addr_type AuthLink::m_peer_addr
protected
int AuthLink::m_protocol_version
protected
GrowingBuffer AuthLink::m_received_bytes_storage
protected

Each link stores incoming bytes locally.

eState AuthLink::m_state
protected
EventProcessor* AuthLink::m_target
protected
GrowingBuffer AuthLink::m_unsent_bytes_storage
protected

Each link stores outgoing bytes locally.


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