#include <thrift_asio_server.hpp>
Static Public Member Functions | |
| static void | serve (boost::asio::io_service &io_service, TProcessor &processor, Handler_ptr handler, unsigned short port) |
Detailed Description
template<typename HandlerType>
class betabugs::networking::thrift_asio_server< HandlerType >
Use this class on the server
- Template Parameters
-
HandlerType the type of the implementation of a handler.
HandlerType
First of all the HandlerType must work with the auto-generated processor you're using. it must also be inherited from thrift_asio_transport::event_handlers to be able to receive transport errors. lastly it must implement the following member functions:
or you can simply inherit your server side handler from thrift_asio_connection_management_mixin
- Examples:
- example_server.cpp.
Member Function Documentation
|
inlinestatic |
call this to start listening for incoming connections. This call is non blocking. To actually service the clients, make sure, that you run/poll the io_service, i.e.
The nice thing about this is, that you RCP-calls will be made from the thread that is calling call_me_once_per_frame(). This means, you'll need no (or a lot less) locking. This is much more suitable for a "realtime" environment.
The documentation for this class was generated from the following file:
