Public Member Functions

ana::listener_handler Struct Reference

Class that should be implemented to handle incoming messages or disconnections. More...

#include <ana.hpp>

Inheritance diagram for ana::listener_handler:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~listener_handler ()
virtual void handle_receive (error_code, net_id, read_buffer)=0
 Handle an incoming message event.
virtual void handle_disconnect (error_code, net_id)=0
 Handle a disconnect event.

Detailed Description

Class that should be implemented to handle incoming messages or disconnections.

Definition at line 120 of file ana.hpp.


Constructor & Destructor Documentation

virtual ana::listener_handler::~listener_handler (  )  [inline, virtual]

Definition at line 122 of file ana.hpp.


Member Function Documentation

virtual void ana::listener_handler::handle_disconnect ( error_code  ,
net_id   
) [pure virtual]

Handle a disconnect event.

Parameters:
error_code : Error code of the disconnecting client, it could shed some light into why it got disconnected.
net_id : ID of the client that gets disconnected.
See also:
error_code
net_id

Implemented in ana_receive_handler, and ana_multiple_receive_handler.

Referenced by asio_listener::disconnect().

Here is the caller graph for this function:

virtual void ana::listener_handler::handle_receive ( error_code  ,
net_id  ,
read_buffer   
) [pure virtual]

Handle an incoming message event.

Parameters:
error_code : Error code of the client sending the message, if it evaluates to false, then no error occurred.
net_id : ID of the client that sends the message.
shared_buffer : The buffer from the incoming message.
See also:
read_buffer
error_code
net_id

Implemented in ana_receive_handler, and ana_multiple_receive_handler.

Referenced by asio_listener::handle_body(), asio_listener::handle_header(), asio_listener::handle_partial_body(), asio_listener::handle_raw_buffer(), and asio_listener::handle_timeout().

Here is the caller graph for this function:


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:17:58 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs