ZIO
Python and C++ interface to ZeroMQ and Zyre
|
#include <actor.hpp>
Public Member Functions | |
template<typename Func , typename... Args> | |
zactor_t (context_t &ctx, Func fn, Args... args) | |
~zactor_t () | |
socket_ref | link () |
Spawn a function in a thread and communicate over a link.
The actor function must take a socket and zero or more optional arguments such as:
void func(socket_t& sock, ...); zio::zactor_t actor(ctx, func, ...); actor.link().send(...);
The socket passed in to the actor function is one end of a bidirection link shared with the application thread. The application thread may get the other end of that link by calling zio::zactor_t::link().
The actor function is expected to participate in a protocol on the link which is compatible with the requirements of CZMQ zactor_fn actor functions:
|
inline |
|
inline |