Class FTryllManagedServerProcess¶
ClassList > FTryllManagedServerProcess
#include <TryllManagedServerProcess.h>
Public Types¶
| Type | Name |
|---|---|
| enum uint8 | ELineSeverity |
Public Static Attributes¶
| Type | Name |
|---|---|
| const TCHAR *const | ClientDevMode |
| const TCHAR *const | ServerModeEnvVar |
| const TCHAR *const | ServerNeedsLicenceMessage |
| const TCHAR *const | TryllDevMode |
Public Functions¶
| Type | Name |
|---|---|
| FTryllManagedServerProcess () = default |
|
| FTryllManagedServerProcess (const FTryllManagedServerProcess &) = delete |
|
| bool | IsObservedReady () const |
| bool | IsRunning () |
| void | ReleaseHandle () |
| bool | Spawn (const FString & ExePath, int32 Port, int32 IdleShutdownTimeoutSeconds, double ReadinessTimeoutSeconds, const FString & LlamaCppBackend, FString & OutError, bool & bOutPortConflict) |
| void | TerminateAndRelease () |
| FTryllManagedServerProcess & | operator= (const FTryllManagedServerProcess &) = delete |
| ~FTryllManagedServerProcess () |
Public Static Functions¶
| Type | Name |
|---|---|
| ELineSeverity | ClassifyLine (const FString & Line) |
| const FString & | GetDeveloperModeOverride () |
| bool | IsLaunchBlockedByLicence () |
| bool | IsNonInteractiveRun () |
| FString | NormalizeLaunchMode (const FString & Value) |
| FString | ResolveLaunchMode () |
| void | SetDeveloperModeOverride (const FString & Mode) |
| bool | ShouldBlockLaunch (const FString & Mode, bool bLicenceAccepted, bool bNonInteractive) |
Detailed Description¶
Plain (non-UObject) helper that spawns tryll_server.exe as a managed child, draining its stdout to the log until released. Shared by UTryllEditorSubsystem and UTryllSubsystem's packaged-build path — those differ in when/which port to spawn on, not in how.
Public Types Documentation¶
enum ELineSeverity¶
Severity of one server stdout line, read from its [time] [level] message prefix.
Public Static Attributes Documentation¶
variable ClientDevMode¶
variable ServerModeEnvVar¶
Environment variable: "tryll-dev" or "client-dev". Wins over the developer override.
variable ServerNeedsLicenceMessage¶
Logged when the licence gate stops a launch. Same text as FTryllEditorUiContract::ServerNeedsLicence, which this module cannot see; a unit test keeps the two equal.
variable TryllDevMode¶
Public Functions Documentation¶
function FTryllManagedServerProcess [1/2]¶
function FTryllManagedServerProcess [2/2]¶
FTryllManagedServerProcess::FTryllManagedServerProcess (
const FTryllManagedServerProcess &
) = delete
function IsObservedReady¶
True after Spawn saw the child accept TCP. False while still warming.
function IsRunning¶
function ReleaseHandle¶
Releases the handle without killing the process (normal teardown).
function Spawn¶
bool FTryllManagedServerProcess::Spawn (
const FString & ExePath,
int32 Port,
int32 IdleShutdownTimeoutSeconds,
double ReadinessTimeoutSeconds,
const FString & LlamaCppBackend,
FString & OutError,
bool & bOutPortConflict
)
Spawns ExePath with "--port Port --idle-shutdown-timeout Seconds --llama-backend LlamaCppBackend" and waits up to ReadinessTimeoutSeconds for its TCP port to start accepting.
Returns true when the launch should proceed to connecting — either the port is already accepting, OR the readiness wait elapsed but the process is still alive (a cold start still warming up). In the latter case the server is deliberately left running, not killed: killing an almost-ready server discards the warmup and forces a cold re-spawn — the root cause of "first launch hangs, relaunch works". The caller connects anyway and the connection worker retries until the server is ready.
Returns false only for a genuine launch failure: the process could not be spawned, or it exited on its own before the port opened. OutError is then populated with a clear reason, and bOutPortConflict is set to true iff the process exited with Tryll::ServerExitPortInUse (3), so callers can special-case a bind collision (retry on a different port).
function TerminateAndRelease¶
Force-terminate then release (test/CI cleanup only).
function operator=¶
FTryllManagedServerProcess & FTryllManagedServerProcess::operator= (
const FTryllManagedServerProcess &
) = delete
function ~FTryllManagedServerProcess¶
Public Static Functions Documentation¶
function ClassifyLine¶
function GetDeveloperModeOverride¶
function IsLaunchBlockedByLicence¶
ShouldBlockLaunch for this process. Always false in packaged builds.
function IsNonInteractiveRun¶
Nobody can click Accept: a commandlet, -unattended, or an automation test.
function NormalizeLaunchMode¶
Canonical mode for Value, or empty when it is not a mode a plugin may launch.
function ResolveLaunchMode¶
Mode for the next spawn: ServerModeEnvVar, then the developer override, then client-dev. tryll-dev spawns also pass telemetry-level off.
function SetDeveloperModeOverride¶
Set by the monorepo-only editor developer menu (compiled only when TRYLL_DEVELOPER_TOOLS=1). Empty clears it. Released plugins never call this.
function ShouldBlockLaunch¶
static bool FTryllManagedServerProcess::ShouldBlockLaunch (
const FString & Mode,
bool bLicenceAccepted,
bool bNonInteractive
)
Licence gate for a server the plugin starts. Blocks only when the licence is not accepted and someone could accept it: never for client-prod (players), tryll-dev, or a non-interactive run.
The documentation for this class was generated from the following file C:/_tryll/_monorepo3/tryll/clients/unreal/Source/TryllClient/Public/TryllManagedServerProcess.h