ark::comms::HttpServerStage
Defined in header “ark/comms/stages/http_server_stage.hh”.
This stage is used for communications. It provides an HTTP server that can give insight into the rest of the system providing streaming APIs for communication pathways that support it, and static APIs to do things like “list the available channels”.
Methods
-
HttpServerStage(std::string name)
Constructor. -
HttpServerStage(NetworkAddress default_address, std::string name)
Constructor. Allows you to specify the address to bind to. Intended for testing. -
~HttpServerStage()
Destructor. Shuts threads down gracefully. -
void add_arguments(core::ArgumentParser & parser)
Add command line arguments for changing the server address. -
void initialize(pipeline::StageInterface & interface)
Initialize the stage internals. -
void start()
Indicates that the system has settled and you should begin any threads or processing. -
void finalize()
Fired when the pipeline is completely down, stopping all active threads. -
NetworkAddress current_bound_address()
Returns the currently bound address from this HTTP stage. Intended to be used for testing, to deterimne where to direct messages.Note this may change at any time, as we rebind() on errors.
-
bool is_bound()
Returns true if the server is currently bound. Note that this is racy, and could become false at any time.