libtasks Documentation  1.6
ip_service_async2 Class Reference

#include <test_uwsgi_thrift_async.h>

Inheritance diagram for ip_service_async2:
Collaboration diagram for ip_service_async2:

Public Member Functions

void service (std::shared_ptr< args_t > args)
 
std::string service_name () const
 
- Public Member Functions inherited from tasks::net::uwsgi_thrift_async_handler< IpService_lookup_result, IpService_lookup_args >
virtual ~uwsgi_thrift_async_handler ()
 
result_tresult_base ()
 Return a reference to the thrift result base object. More...
 
auto result () -> decltype((m_result.success))
 Return a reference to the thrift result object. A thrift handler uses this to return data. More...
 
void set_uwsgi_task (uwsgi_task *t)
 The uwsgi_thrift_async_processor uses this method to assign the underlying uwsgi_task object. More...
 
void on_finish (handler_finish_func_t f)
 
- Public Member Functions inherited from tasks::error_base
 error_base ()
 
virtual ~error_base ()
 
bool error () const
 Return true if an error occured. More...
 
tasks_error error_code () const
 Return the error code. More...
 
const std::string & error_message () const
 Return the error message. More...
 
int sys_errno () const
 Return the errno if available. More...
 
std::string sys_errno_str () const
 Return the errno description if available. More...
 
const tasks_exceptionexception () const
 Return the underlying exception object. More...
 
void set_exception (tasks_exception &e)
 Set an exception to report an error. More...
 
void reset_error ()
 Reset the error state. More...
 

Additional Inherited Members

- Public Types inherited from tasks::net::uwsgi_thrift_async_handler< IpService_lookup_result, IpService_lookup_args >
using handler_finish_func_t = std::function< void()>
 
using result_t = IpService_lookup_result
 
using args_t = IpService_lookup_args
 
- Protected Member Functions inherited from tasks::net::uwsgi_thrift_async_handler< IpService_lookup_result, IpService_lookup_args >
const uwsgi_requestrequest () const
 
const uwsgi_requestrequest_p () const
 
http_responseresponse ()
 
http_responseresponse_p ()
 
void finish ()
 Async handlers call this method to trigger the processor callback. More...
 
void set_error (std::string msg)
 Report an error. More...
 

Detailed Description

Definition at line 28 of file test_uwsgi_thrift_async.h.

Member Function Documentation

void ip_service_async2::service ( std::shared_ptr< args_t args)
virtual

The service method will be called by the processor after a new thrift message has been deserialized.

Parameters
argsA pointer to the arguments of the thrift service method.

Implements tasks::net::uwsgi_thrift_async_handler< IpService_lookup_result, IpService_lookup_args >.

Definition at line 50 of file test_uwsgi_thrift_async.cpp.

Here is the call graph for this function:

std::string ip_service_async2::service_name ( ) const
inlinevirtual
Returns
The name of the thrift service. This name has to match the name in the thrift IDL. Look at the uwsgi async test for an example.

Implements tasks::net::uwsgi_thrift_async_handler< IpService_lookup_result, IpService_lookup_args >.

Definition at line 31 of file test_uwsgi_thrift_async.h.


The documentation for this class was generated from the following files: