Public Member Functions

ana::server::client_proxy Struct Reference

A connected client's representative in the server side. More...

#include <ana.hpp>

Inheritance diagram for ana::server::client_proxy:
Inheritance graph
[legend]
Collaboration diagram for ana::server::client_proxy:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void send (detail::shared_buffer, send_handler *, sender *, operation_id)=0
 Send a buffer to the corresponding client.
virtual ~client_proxy ()
 Standard destructor.
virtual void cancel_pending ()=0
 Cancel all pending network operations.
virtual std::string ip_address () const =0
 Returns the string representing the ip address of the connected client.
virtual void expecting_message (size_t ms_until_timeout)=0
 Signal the client proxy that you are waiting for a message from the actual client before a given time.

Detailed Description

A connected client's representative in the server side.

Definition at line 555 of file ana.hpp.


Constructor & Destructor Documentation

virtual ana::server::client_proxy::~client_proxy (  )  [inline, virtual]

Standard destructor.

Definition at line 573 of file ana.hpp.


Member Function Documentation

virtual void ana::server::client_proxy::cancel_pending (  )  [pure virtual]

Cancel all pending network operations.

Every pending operation handler will be invoked with ana::operation_aborted as the corresponding error_code, except that the error code will be boost::asio::error::operation_not_supported when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless BOOST_ASIO_ENABLE_CANCELIO is defined.

Referenced by asio_server::cancel_pending().

Here is the caller graph for this function:

virtual void ana::server::client_proxy::expecting_message ( size_t  ms_until_timeout  )  [pure virtual]

Signal the client proxy that you are waiting for a message from the actual client before a given time.

The time parameter indicates how long you are willing to wait.

If a message is received before this time period then this call will be insignificant. However, if no such message is received, the appropriate call to handle_receive will be made with ana::timeout_error as the error_code parameter.

Use the methods described in the ana::time namespace to create time lapses.

Examples:

  • client->waiting_for_message( ana::time::seconds( 5 ) );
See also:
error_code
virtual std::string ana::server::client_proxy::ip_address (  )  const [pure virtual]

Returns the string representing the ip address of the connected client.

virtual void ana::server::client_proxy::send ( detail::shared_buffer  ,
send_handler ,
sender *  ,
operation_id   
) [pure virtual]

Send a buffer to the corresponding client.

Parameters:
buffer : The memory portion or buffer being sent.
handler : The handler of the completion or error event.
sender : The object with the timeout configuration.
See also:
shared_buffer
send_handler
sender

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:18:00 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs