Public Member Functions | Protected Member Functions

ana::detail::listener Class Reference

Base class for any network entity that handles incoming messages. More...

#include <ana.hpp>

Inheritance diagram for ana::detail::listener:
Inheritance graph
[legend]
Collaboration diagram for ana::detail::listener:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void set_listener_handler (listener_handler *listener)=0
 Sets the handler for incoming messages.
virtual void set_raw_buffer_max_size (size_t size)=0
 Sets the size of raw buffer.
virtual void wait_raw_object (ana::serializer::bistream &bis, size_t size)=0
 Block the caller waiting for an incoming message of a certain amount of bytes.
virtual void run_listener ()=0
 Start listening for incoming messages.

Protected Member Functions

 listener ()

Detailed Description

Base class for any network entity that handles incoming messages.

Definition at line 249 of file ana.hpp.


Constructor & Destructor Documentation

ana::detail::listener::listener (  )  [inline, protected]

Definition at line 284 of file ana.hpp.


Member Function Documentation

virtual void ana::detail::listener::run_listener (  )  [pure virtual]

Start listening for incoming messages.

Implemented in asio_listener.

Referenced by ana_network_manager::create_client_and_connect().

Here is the caller graph for this function:

virtual void ana::detail::listener::set_listener_handler ( listener_handler listener  )  [pure virtual]

Sets the handler for incoming messages.

Parameters:
listener : Pointer to the listener_handler object that will handle following incoming message events.
See also:
listener_handler

Implemented in asio_listener.

Referenced by ana_network_manager::create_client_and_connect(), and ana_network_manager::create_server().

Here is the caller graph for this function:

virtual void ana::detail::listener::set_raw_buffer_max_size ( size_t  size  )  [pure virtual]

Sets the size of raw buffer.

Parameters:
size : The requested size for raw buffers.
Precondition:
: Parameter should be positive.

Implemented in asio_listener.

virtual void ana::detail::listener::wait_raw_object ( ana::serializer::bistream bis,
size_t  size 
) [pure virtual]

Block the caller waiting for an incoming message of a certain amount of bytes.

Parameters:
bis : Binary stream where the data will be stored.
size : The amount of bytes trying to be read.

Implemented in asio_listener.

Referenced by ana_network_manager::create_client_and_connect().

Here is the caller graph for this function:


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

Generated by doxygen 1.7.1 on Thu May 24 2012 01:19:18 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs