

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 | |
| server * | server_ |
| std::map< net_id, std::string > | names_ |
Definition at line 42 of file server.cpp.
| ChatServer::ChatServer | ( | ) | [inline] |
Definition at line 47 of file server.cpp.
| ChatServer::~ChatServer | ( | ) | [inline] |
Definition at line 69 of file server.cpp.
| 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.
| error_code | : Error code of the event. | |
| net_id | : ID of the client that connects. |
Implements ana::connection_handler.
Definition at line 75 of file server.cpp.
References ana::buffer().

| 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().

| 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().

| 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().

| void ChatServer::run | ( | port | pt | ) | [inline] |
Definition at line 53 of file server.cpp.
Referenced by main().

std::map<net_id, std::string> ChatServer::names_ [private] |
Definition at line 151 of file server.cpp.
server* ChatServer::server_ [private] |
Definition at line 150 of file server.cpp.
| Generated by doxygen 1.7.1 on Wed May 23 2012 01:12:48 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |