Stores the configuration of the currently running middleware. More...
#include <middleware_configuration.hpp>
Public Member Functions | |
const process_id & | pid () const |
boost::uint16_t | port () const |
const std::string & | port_as_string () const |
middleware_configuration () | |
middleware_configuration (boost::uint16_t port) | |
bool | read () |
bool | write () |
Stores the configuration of the currently running middleware.
hamcast::ipc::middleware_configuration::middleware_configuration | ( | ) |
Create an "empty" configuration with port = 0.
hamcast::ipc::middleware_configuration::middleware_configuration | ( | boost::uint16_t | port | ) |
Create a valid configuration with given port and detect process id automatically.
port | The port as (16-bit, unsigned) integer. |
const process_id& hamcast::ipc::middleware_configuration::pid | ( | ) | const |
Get the process id of the middleware.
boost::uint16_t hamcast::ipc::middleware_configuration::port | ( | ) | const |
Get the port the middleware is running at.
const std::string& hamcast::ipc::middleware_configuration::port_as_string | ( | ) | const |
Get the port as string representation.
bool hamcast::ipc::middleware_configuration::read | ( | ) |
Read to configuration from the middleware.
true
if a config file from a running middleware was found and read; otherwise false
. bool hamcast::ipc::middleware_configuration::write | ( | ) |
Write this configuration to disc.
true
if a config file was written; otherwise false
.