Public Member Functions | Private Member Functions | Private Attributes

ChatServer Class Reference

Inheritance diagram for ChatServer:
Inheritance graph
[legend]
Collaboration diagram for ChatServer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ChatServer ()
void run (port pt)
 ~ChatServer ()

Private Member Functions

virtual void handle_connect (ana::error_code error, net_id client)
 Handle new connection event.
virtual void handle_disconnect (ana::error_code error, net_id client)
virtual void handle_send (ana::error_code error, net_id client, ana::operation_id id)
std::string get_name (const std::string &msg)
void parse_command (net_id client, const std::string &msg)
virtual void handle_receive (ana::error_code error, net_id client, ana::read_buffer buffer)

Private Attributes

serverserver_
std::map< net_id, std::string > names_

Detailed Description

Definition at line 42 of file server.cpp.


Constructor & Destructor Documentation

ChatServer::ChatServer (  )  [inline]

Definition at line 47 of file server.cpp.

ChatServer::~ChatServer (  )  [inline]

Definition at line 69 of file server.cpp.


Member Function Documentation

std::string ChatServer::get_name ( const std::string &  msg  )  [inline, private]

Definition at line 100 of file server.cpp.

References pos.

virtual void ChatServer::handle_connect ( ana::error_code  ,
net_id   
) [inline, private, virtual]

Handle new connection event.

Parameters:
error_code : Error code of the event.
net_id : ID of the client that connects.
See also:
error_code
net_id

Implements ana::connection_handler.

Definition at line 75 of file server.cpp.

References ana::buffer().

Here is the call graph for this function:

virtual void ChatServer::handle_disconnect ( ana::error_code  error,
net_id  client 
) [inline, private, virtual]

Definition at line 86 of file server.cpp.

References ana::buffer().

Here is the call graph for this function:

virtual void ChatServer::handle_receive ( ana::error_code  error,
net_id  client,
ana::read_buffer  buffer 
) [inline, private, virtual]

Definition at line 127 of file server.cpp.

References ana::buffer(), and game_logic::msg().

Here is the call graph for this function:

virtual void ChatServer::handle_send ( ana::error_code  error,
net_id  client,
ana::operation_id  id 
) [inline, private, virtual]

Definition at line 94 of file server.cpp.

void ChatServer::parse_command ( net_id  client,
const std::string &  msg 
) [inline, private]

Definition at line 107 of file server.cpp.

References ana::buffer().

Here is the call graph for this function:

void ChatServer::run ( port  pt  )  [inline]

Definition at line 53 of file server.cpp.

Referenced by main().

Here is the caller graph for this function:


Member Data Documentation

std::map<net_id, std::string> ChatServer::names_ [private]

Definition at line 151 of file server.cpp.

Definition at line 150 of file server.cpp.


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 Wed May 23 2012 01:12:48 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs