Skip to content

ADedicatedServerPlatform

expect object ADedicatedServerPlatform

Cross-loader bridge for dedicated server bootstrap used by client GameTests.

Functions

isAlive

expect fun isAlive(serverInstance: Any): Boolean

Whether the dedicated server identified by serverInstance is still running.

port

expect fun port(serverInstance: Any): Int

The port the dedicated server identified by serverInstance is listening on.

start

expect fun start(
    serverDirectory: Path, 
    serverProperties: Properties, 
    timeoutSeconds: Long
): Any

Boots a loader-specific dedicated server rooted at serverDirectory using serverProperties, waiting up to timeoutSeconds for it to finish starting.

Return

An opaque, loader-specific handle to pass to stop/port/isAlive.

stop

expect fun stop(serverInstance: Any)

Shuts down the dedicated server identified by serverInstance (as returned by start).