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 Types | Protected Member Functions | Protected Attributes | List of all members
CRUDLink Class Referenceabstract

#include <CRUD_Link.h>

Inheritance diagram for CRUDLink:
Inheritance graph
Collaboration diagram for CRUDLink:
Collaboration graph

Public Types

using stream_type = ACE_SOCK_Dgram
 
using addr_type = ACE_INET_Addr
 

Public Member Functions

 CRUDLink ()
 
 ~CRUDLink () override
 
int open (void *=nullptr) override
 
int handle_output (ACE_HANDLE=ACE_INVALID_HANDLE) override
 
void received_block (BitStream &bytes)
 CRUDLink::received_block - convert incoming bytes to PacketEvent's. More...
 
void dispatch (SEGSEvent *) override
 
CrudP_Protocolget_proto ()
 
stream_typepeer ()
 
addr_typepeer_addr ()
 
ACE_Time_Value client_last_seen_packets () const
 return the amount of time this client hasn't received anything More...
 
ACE_Time_Value last_sent_packets () const
 return the amount of time this client wasn't sending anything More...
 
size_t client_packets_waiting_for_ack () const
 
- 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 Types

using super = LinkBase
 

Protected Member Functions

ACE_HANDLE get_handle (void) const override
 
int handle_close (ACE_HANDLE h, ACE_Reactor_Mask c) override
 
void event_for_packet (PacketEvent *pak_ev)
 CRUDLink::event_for_packet - convert incoming packet into higher level events and push them to our target() More...
 
void packets_for_event (SEGSEvent *c_ev)
 CRUDLink::packets_for_event - convert event to 1-n packets and push them to our net_layer() More...
 
void connection_update ()
 Connection updates are done only when new data is available on the link. More...
 
void connection_sent_packet ()
 Connection updates are done only when new data is sent on the link. More...
 
EventProcessortarget ()
 
EventProcessornet_layer ()
 
virtual CRUD_EventFactoryfactory ()=0
 

Protected Attributes

ACE_Reactor_Notification_Strategy m_notifier
 
ACE_Time_Value m_last_recv_activity
 
ACE_Time_Value m_last_send_activity
 
CrudP_Protocol m_protocol
 
stream_type peer_
 Maintain connection with client. More...
 
addr_type m_peer_addr
 
EventProcessorm_net_layer
 All outgoing events are put here. More...
 
EventProcessorm_target
 All incoming events are put here. More...
 

Member Typedef Documentation

using CRUDLink::addr_type = ACE_INET_Addr
using CRUDLink::stream_type = ACE_SOCK_Dgram
using CRUDLink::super = LinkBase
protected

Member Function Documentation

ACE_Time_Value CRUDLink::client_last_seen_packets ( ) const
inline

return the amount of time this client hasn't received anything

size_t CRUDLink::client_packets_waiting_for_ack ( ) const
inline

Here is the call graph for this function:

Here is the caller graph for this function:

void CRUDLink::dispatch ( SEGSEvent )
inlineoverridevirtual

Implements EventProcessor.

virtual CRUD_EventFactory& CRUDLink::factory ( )
protectedpure virtual

Implemented in GameLink, and MapLink.

Here is the caller graph for this function:

ACE_HANDLE CRUDLink::get_handle ( void  ) const
inlineoverrideprotected
CrudP_Protocol* CRUDLink::get_proto ( )
inline
ACE_Time_Value CRUDLink::last_sent_packets ( ) const
inline

return the amount of time this client wasn't sending anything

Here is the caller graph for this function:

EventProcessor* CRUDLink::net_layer ( )
inlineprotected

Here is the caller graph for this function:

stream_type& CRUDLink::peer ( )
inline
addr_type& CRUDLink::peer_addr ( )
inline

Here is the caller graph for this function:

EventProcessor* CRUDLink::target ( )
inlineprotected

Here is the caller graph for this function:

Member Data Documentation

ACE_Time_Value CRUDLink::m_last_recv_activity
protected
ACE_Time_Value CRUDLink::m_last_send_activity
protected
EventProcessor* CRUDLink::m_net_layer
protected

All outgoing events are put here.

ACE_Reactor_Notification_Strategy CRUDLink::m_notifier
protected
addr_type CRUDLink::m_peer_addr
protected
CrudP_Protocol CRUDLink::m_protocol
protected
EventProcessor* CRUDLink::m_target
protected

All incoming events are put here.

stream_type CRUDLink::peer_
protected

Maintain connection with client.


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