#include <Server.h>

Classes | |
| struct | InfoPerNode |
| struct | InfoPerPublisher |
| struct | InfoPerService |
| struct | InfoPerSubscriber |
| struct | InfoPerTopic |
Public Member Functions | |
| unsigned int | listenningPort () const |
| void | listenningPort (unsigned int port) |
| Server () | |
| ~Server () | |
Main mvsim Server API | |
| void | start () |
| void | shutdown () noexcept |
Private Member Functions | |
| void | internalServerThread () |
| void | requestMainThreadTermination () |
Private Attributes | |
| std::thread | mainThread_ |
| std::atomic< zmq::context_t * > | mainThreadZMQcontext_ = nullptr |
| unsigned int | serverPortNo_ = MVSIM_PORTNO_MAIN_REP |
This class creates a parallel thread and listens for incoming connections from clients. This is the main hub for advertising and subscribing to topics. Users should instance a class mvsim::Client (C++) or mvsim.Client (Python) to interface with this server.
Usage:
Messages and topics are described as Protobuf messages, and communications are done via ZMQ sockets.
|
private |
|
private |
|
private |
|
private |
| Server::Server | ( | ) |
Definition at line 37 of file Server.cpp.
| Server::~Server | ( | ) |
Definition at line 39 of file Server.cpp.
|
private |
Definition at line 232 of file Server.cpp.
|
private |
Adds a new offer for a service
Definition at line 268 of file Server.cpp.
|
private |
Adds a new publisher for a given topic
Definition at line 201 of file Server.cpp.
|
private |
Definition at line 296 of file Server.cpp.
|
private |
Adds the given node
Definition at line 192 of file Server.cpp.
|
private |
Remove all references to a given node name
Definition at line 173 of file Server.cpp.
|
private |
Definition at line 77 of file Server.cpp.
|
private |
Definition at line 157 of file Server.cpp.
|
noexcept |
Shutdowns the server. Blocks until the thread is stopped. There is no need to manually call this method, it is called upon destruction.
Definition at line 59 of file Server.cpp.
| void Server::start | ( | ) |
Launches the server in a parallel thread and returns immediately.
Definition at line 41 of file Server.cpp.
|
private |
|
mutableprivate |
|
private |
|
private |
|
private |
|
private |