![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Class for the server side receiving requests from a client. More...
#include <ZMQReceiver.h>
Public Member Functions | |
| ZMQReceiver (const std::string &address="tcp://127.0.0.1:51454", int timeout=10000) | |
| ZMQReceiver (const ZMQReceiver &)=delete | |
| ZMQReceiver & | operator= (const ZMQReceiver &)=delete |
| virtual | ~ZMQReceiver () |
| void | Start () |
| Starts the receiver mainloop in a new thread. More... | |
| void | Stop () |
| std::runtime_error | GetLastError () |
| Returns the last error from the mainloop thread. More... | |
| void | SetMessageProcessor (std::shared_ptr< MessageProcessorBase > processor) |
| Sets the message processor object which will process incoming messages. More... | |
Class for the server side receiving requests from a client.
| cloudViewer::io::rpc::ZMQReceiver::ZMQReceiver | ( | const std::string & | address = "tcp://127.0.0.1:51454", |
| int | timeout = 10000 |
||
| ) |
Constructs a receiver listening on the specified address.
| address | Address to listen on. |
| timeout | Timeout in milliseconds for sending the reply. |
|
delete |
|
virtual |
References Stop().
| std::runtime_error cloudViewer::io::rpc::ZMQReceiver::GetLastError | ( | ) |
|
delete |
| void cloudViewer::io::rpc::ZMQReceiver::SetMessageProcessor | ( | std::shared_ptr< MessageProcessorBase > | processor | ) |
Sets the message processor object which will process incoming messages.
Referenced by cloudViewer::io::rpc::DummyReceiver::DummyReceiver().
| void cloudViewer::io::rpc::ZMQReceiver::Start | ( | ) |
Starts the receiver mainloop in a new thread.
References GetLastError(), LogDebug, and LogError.
| void cloudViewer::io::rpc::ZMQReceiver::Stop | ( | ) |
Stops the receiver mainloop and joins the thread. This function blocks until the mainloop is done with processing messages that have already been received.
References LogDebug.
Referenced by ~ZMQReceiver().