ReCodEx - Task Broker
ReCodEx is complex programmer testing solution, primary targeted to technical universities. It's highly customizable and based on modern technologies.
router_socket_wrapper Class Reference

#include <router_socket_wrapper.h>

+ Inheritance diagram for router_socket_wrapper:

Public Member Functions

 router_socket_wrapper (std::shared_ptr< zmq::context_t > context, const std::string &addr, const bool bound)
 
bool send_message (const message_container &message)
 
bool receive_message (message_container &target)
 
- Public Member Functions inherited from socket_wrapper_base
 socket_wrapper_base (std::shared_ptr< zmq::context_t > context, zmq::socket_type type, const std::string &addr, const bool bound)
 
virtual ~socket_wrapper_base ()
 
zmq_pollitem_t get_pollitem ()
 
virtual void initialize ()
 
void restart ()
 

Additional Inherited Members

- Protected Attributes inherited from socket_wrapper_base
zmq::socket_t socket_
 
const std::string addr_
 
const bool bound_
 

Detailed Description

Wraps a ZeroMQ router socket

Definition at line 11 of file router_socket_wrapper.h.

Constructor & Destructor Documentation

§ router_socket_wrapper()

router_socket_wrapper::router_socket_wrapper ( std::shared_ptr< zmq::context_t >  context,
const std::string &  addr,
const bool  bound 
)
Parameters
contexta ZeroMQ context
addraddress used by the socket
boundtrue if the socket should bind, false if it connects

Definition at line 3 of file router_socket_wrapper.cpp.

Member Function Documentation

§ receive_message()

bool router_socket_wrapper::receive_message ( message_container )
virtual

Receive a message from the socket

Returns
true on success, false otherwise

Implements socket_wrapper_base.

Definition at line 29 of file router_socket_wrapper.cpp.

§ send_message()

bool router_socket_wrapper::send_message ( const message_container )
virtual

Send a message through the socket

Returns
true on success, false otherwise

Implements socket_wrapper_base.

Definition at line 9 of file router_socket_wrapper.cpp.


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