SEGS  0.4.2
Super Entity Game Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
Projects/CoX/Common/AuthProtocol

Functions

static AuthLinkEventAuthEventFactory::EventForType (eAuthPacketType type)
 
static void AuthEventFactory::Destroy (AuthLinkEvent *what)
 
 AuthLink::AuthLink ()
 
 AuthLink::AuthLink (EventProcessor *target, AuthLinkType link_type=AuthLinkType::Server)
 
 AuthLink::~AuthLink (void) override
 
void AuthLink::init_crypto (int vers, uint32_t seed)
 
eAuthPacketType AuthLink::OpcodeToType (uint8_t opcode) const
 Convert opcode byte to corresponding packet type. More...
 
SEGSEventAuthLink::bytes_to_event ()
 tries to convert the available bytes into a valid AuthHandler LinkLevelEvent. More...
 
int AuthLink::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 AuthLink::handle_input (ACE_HANDLE) override
 Called when new bytes are available. More...
 
int AuthLink::handle_output (ACE_HANDLE fd=ACE_INVALID_HANDLE) override
 Called from ACEReactor when there are events in our queue() More...
 
void AuthLink::encode_buffer (const AuthLinkEvent *ev, size_t start)
 
bool AuthLink::send_buffer ()
 
void AuthLink::set_protocol_version (int vers)
 
int AuthLink::handle_close (ACE_HANDLE handle, ACE_Reactor_Mask close_mask) override
 Called when this handler is removed from the ACE_Reactor. More...
 
void AuthLink::dispatch (SEGSEvent *ev) override
 
void AuthPacketCodec::SetDesKey (uint64_t key)
 
 AuthPacketCodec::AuthPacketCodec ()
 
void AuthPacketCodec::XorCodeBuf (unsigned char *buffer, size_t length)
 
void AuthPacketCodec::XorDecodeBuf (unsigned char *buffer, size_t length)
 
void AuthPacketCodec::DesCode (unsigned char *buffer, size_t size) const
 
void AuthPacketCodec::SetXorKey (int key)
 
void AuthPacketCodec::Code (unsigned char *buffer, size_t size)
 
void AuthPacketCodec::Decode (unsigned char *buffer, size_t size)
 
void AuthPacketCodec::DesDecode (unsigned char *buffer, size_t size) const
 

Detailed Description

Function Documentation

AuthLink::AuthLink ( )
AuthLink::AuthLink ( EventProcessor target,
AuthLinkType  link_type = AuthLinkType::Server 
)
AuthPacketCodec::AuthPacketCodec ( )

Here is the call graph for this function:

SEGSEvent * AuthLink::bytes_to_event ( )
protected

tries to convert the available bytes into a valid AuthHandler LinkLevelEvent.

Here is the call graph for this function:

Here is the caller graph for this function:

void AuthPacketCodec::Code ( unsigned char *  buffer,
size_t  size 
)

Here is the call graph for this function:

void AuthPacketCodec::Decode ( unsigned char *  buffer,
size_t  size 
)

Here is the call graph for this function:

void AuthPacketCodec::DesCode ( unsigned char *  buffer,
size_t  size 
) const

Here is the caller graph for this function:

void AuthPacketCodec::DesDecode ( unsigned char *  buffer,
size_t  size 
) const

Here is the caller graph for this function:

void AuthEventFactory::Destroy ( AuthLinkEvent what)
static

Here is the call graph for this function:

void AuthLink::dispatch ( SEGSEvent ev)
overridevirtual

Implements EventProcessor.

void AuthLink::encode_buffer ( const AuthLinkEvent ev,
size_t  start 
)
protected

Here is the call graph for this function:

Here is the caller graph for this function:

AuthLinkEvent * AuthEventFactory::EventForType ( eAuthPacketType  type)
static

Here is the caller graph for this function:

int AuthLink::handle_close ( ACE_HANDLE  handle,
ACE_Reactor_Mask  close_mask 
)
override

Called when this handler is removed from the ACE_Reactor.

Here is the call graph for this function:

int AuthLink::handle_input ( ACE_HANDLE  )
override

Called when new bytes are available.

Returns
-1 on error

Here is the call graph for this function:

int AuthLink::handle_output ( ACE_HANDLE  fd = ACE_INVALID_HANDLE)
override

Called from ACEReactor when there are events in our queue()

Here is the call graph for this function:

void AuthLink::init_crypto ( int  vers,
uint32_t  seed 
)

Here is the call graph for this function:

Here is the caller graph for this function:

eAuthPacketType AuthLink::OpcodeToType ( uint8_t  opcode) const
protected

Convert opcode byte to corresponding packet type.

  • opcode packet opcode byte
  • direction if this is false then the packet is from server to client, other way around otherwise

Here is the caller graph for this function:

int AuthLink::open ( void *  p = nullptr)
override

Called when we start to service a new connection, here we tell reactor to wake us when queue() is not empty.

Returns
-1 if there was a problem opening a new link, getting remote's address or registering client handler

Here is the call graph for this function:

bool AuthLink::send_buffer ( )
protected

Here is the call graph for this function:

Here is the caller graph for this function:

void AuthLink::set_protocol_version ( int  vers)
protected

Here is the call graph for this function:

Here is the caller graph for this function:

void AuthPacketCodec::SetDesKey ( uint64_t  key)

Here is the caller graph for this function:

void AuthPacketCodec::SetXorKey ( int  key)

Here is the caller graph for this function:

void AuthPacketCodec::XorCodeBuf ( unsigned char *  buffer,
size_t  length 
)

Here is the caller graph for this function:

void AuthPacketCodec::XorDecodeBuf ( unsigned char *  buffer,
size_t  length 
)

Here is the caller graph for this function:

AuthLink::~AuthLink ( void  )
override