|
PACS System 0.1.0
PACS DICOM system library
|
RAII guard for DCMTK server processes. More...
#include <dcmtk_tool.h>

Public Member Functions | |
| dcmtk_server_guard (const std::string &tool_name, uint16_t port, const std::vector< std::string > &args) | |
| Construct a server guard. | |
| ~dcmtk_server_guard () | |
| dcmtk_server_guard (const dcmtk_server_guard &)=delete | |
| dcmtk_server_guard & | operator= (const dcmtk_server_guard &)=delete |
| dcmtk_server_guard (dcmtk_server_guard &&other) noexcept | |
| dcmtk_server_guard & | operator= (dcmtk_server_guard &&other) noexcept |
| bool | wait_for_ready (std::chrono::seconds timeout=std::chrono::seconds{10}) const |
| Wait for the server to be ready (accepting connections) | |
| void | stop () |
| Stop the server. | |
| bool | is_running () const |
| uint16_t | port () const noexcept |
| process_launcher::pid_type | pid () const noexcept |
Static Private Member Functions | |
| static std::string | find_tool_path (const std::string &tool_name) |
Private Attributes | |
| background_process_guard | process_ |
| uint16_t | port_ {0} |
RAII guard for DCMTK server processes.
Provides lifecycle management for DCMTK server processes with automatic cleanup on destruction.
Definition at line 415 of file dcmtk_tool.h.
|
inline |
Construct a server guard.
| tool_name | Name of the DCMTK server tool |
| port | Port the server is listening on |
| args | Command-line arguments |
Definition at line 423 of file dcmtk_tool.h.
References find_tool_path(), pid(), process_, kcenon::pacs::integration_test::background_process_guard::set_pid(), and kcenon::pacs::integration_test::process_launcher::start_background().

|
inline |
Definition at line 435 of file dcmtk_tool.h.
References stop().

|
delete |
|
inlinenoexcept |
Definition at line 444 of file dcmtk_tool.h.
|
inlinestaticprivate |
Definition at line 492 of file dcmtk_tool.h.
Referenced by dcmtk_server_guard().

|
inlinenodiscard |
Definition at line 479 of file dcmtk_tool.h.
References kcenon::pacs::integration_test::background_process_guard::is_running(), and process_.
Referenced by TEST_CASE().


|
delete |
|
inlinenoexcept |
|
inlinenodiscardnoexcept |
Definition at line 487 of file dcmtk_tool.h.
References kcenon::pacs::integration_test::background_process_guard::pid(), and process_.
Referenced by dcmtk_server_guard(), and TEST_CASE().


|
inlinenodiscardnoexcept |
|
inline |
Stop the server.
Definition at line 474 of file dcmtk_tool.h.
References process_, and kcenon::pacs::integration_test::background_process_guard::stop().
Referenced by operator=(), and ~dcmtk_server_guard().


|
inlinenodiscard |
Wait for the server to be ready (accepting connections)
| timeout | Maximum wait time |
Definition at line 465 of file dcmtk_tool.h.
|
private |
|
private |
Definition at line 510 of file dcmtk_tool.h.
Referenced by dcmtk_server_guard(), is_running(), operator=(), pid(), and stop().