Skip to content

Struct Tryll::Client::ManagedServerOptions

ClassList > Tryll > Client > ManagedServerOptions

Configuration passed to ManagedServer::Start .

  • #include <ManagedServer.h>

Public Attributes

Type Name
std::filesystem::path exe
std::vector< std::string > extraArgs
Extra command-line arguments appended after -- port < port > .
std::string host = "127.0.0.1"
int idleShutdownTimeoutSeconds = 60
std::uint16_t port = 9100
std::chrono::milliseconds startTimeout = std::chrono::seconds{30}
How long to wait for the TCP port to become reachable after spawn.
std::filesystem::path stderrLog
std::filesystem::path stdoutLog
std::chrono::milliseconds stopTimeout = std::chrono::seconds{8}
std::filesystem::path workingDirectory

Public Attributes Documentation

variable exe

std::filesystem::path Tryll::Client::ManagedServerOptions::exe;

Path to the tryll_server executable. Required — no automatic discovery is performed.


variable extraArgs

Extra command-line arguments appended after -- port < port > .

std::vector<std::string> Tryll::Client::ManagedServerOptions::extraArgs;


variable host

std::string Tryll::Client::ManagedServerOptions::host;

Host name / IP for the TCP ready-probe after spawn. Almost always "127.0.0.1" (the default).


variable idleShutdownTimeoutSeconds

int Tryll::Client::ManagedServerOptions::idleShutdownTimeoutSeconds;

Seconds of idle (zero sessions, no in-flight downloads) after which the launched server self-exits. Passed as --idle-shutdown-timeout <N> on the command line when non-zero. Default 60: an auto-launched server is disposable — this manager's Stop()/destructor no longer kill the process (see Stop()), so the server must be told to exit on its own once nothing is using it, or it leaks until the machine reboots. Pass 0 only when the caller has its own explicit reap strategy (e.g. the QA harness, which always calls a hard kill on teardown).


variable port

std::uint16_t Tryll::Client::ManagedServerOptions::port;

TCP port the server will listen on. Passed as -- port < port > on the server command line so it overrides whatever is in server-config.json. Default: 9100.


variable startTimeout

How long to wait for the TCP port to become reachable after spawn.

std::chrono::milliseconds Tryll::Client::ManagedServerOptions::startTimeout;


variable stderrLog

std::filesystem::path Tryll::Client::ManagedServerOptions::stderrLog;

If non-empty, the child process's stderr is redirected to this file. Empty (default) discards stderr.


variable stdoutLog

std::filesystem::path Tryll::Client::ManagedServerOptions::stdoutLog;

If non-empty, the child process's stdout is redirected to this file. Empty (default) discards stdout.


variable stopTimeout

std::chrono::milliseconds Tryll::Client::ManagedServerOptions::stopTimeout;

How long to wait for the process to exit after ManagedServer::Stop (or the destructor) sends the termination signal.


variable workingDirectory

std::filesystem::path Tryll::Client::ManagedServerOptions::workingDirectory;

Working directory for the child process. Empty (default) means the executable's parent directory, which is where the server looks for its data/ folder by default.



The documentation for this class was generated from the following file C:/_tryll/_monorepo3/tryll/clients/cpp/include/tryll/ManagedServer.h