Skip to content

Info

Runnable example

python/examples/server_info.py — calls Info.GetServerInfo once and prints the mod/engine version, platform, Wine flag, and engine/renderer host PIDs.

resoio.info.get_server_info async

get_server_info(socket_path: str | None = None) -> ServerInfo

Fetch the server info over a one-shot UDS connection.

Info deliberately has no client class: the version-mismatch probe in the shared client base must read the mod version before any client is usable, so the modality is exposed as module functions (:func:fetch_server_info is the bare-channel form).

PARAMETER DESCRIPTION
socket_path

Explicit UDS path. With None the path is resolved via RESONITE_IO_SOCKETRESONITE_IO_SOCKET_DIR~/.resonite-io/; resolution may raise :class:resoio.SocketNotFoundError or :class:resoio.AmbiguousSocketError.

TYPE: str | None DEFAULT: None

RETURNS DESCRIPTION
The

class:ServerInfo snapshot reported by the mod.

TYPE: ServerInfo

RAISES DESCRIPTION
GRPCError

The RPC failed at the transport or server layer (UNIMPLEMENTED means the mod predates the Info service).

Source code in src/resoio/info.py
async def get_server_info(socket_path: str | None = None) -> ServerInfo:
    """Fetch the server info over a one-shot UDS connection.

    Info deliberately has no client class: the version-mismatch probe
    in the shared client base must read the mod version before any
    client is usable, so the modality is exposed as module functions
    (:func:`fetch_server_info` is the bare-channel form).

    Args:
        socket_path: Explicit UDS path. With ``None`` the path is
            resolved via ``RESONITE_IO_SOCKET`` →
            ``RESONITE_IO_SOCKET_DIR`` → ``~/.resonite-io/``; resolution
            may raise :class:`resoio.SocketNotFoundError` or
            :class:`resoio.AmbiguousSocketError`.

    Returns:
        The :class:`ServerInfo` snapshot reported by the mod.

    Raises:
        grpclib.exceptions.GRPCError: The RPC failed at the transport or
            server layer (``UNIMPLEMENTED`` means the mod predates the
            Info service).
    """
    path = socket_path or resolve_socket_path()
    _logger.debug("Opening Info channel on UDS path: %s", path)
    channel = Channel(path=path)
    try:
        return await fetch_server_info(channel)
    finally:
        channel.close()

resoio.info.ServerInfo dataclass

ServerInfo(
    mod_version: str,
    engine_version: str,
    platform: ServerPlatform,
    is_wine: bool,
    resonite_pid: int,
    renderer_pid: int,
)

Immutable snapshot of the running mod and engine.

ATTRIBUTE DESCRIPTION
mod_version

Mod version derived from the csproj <Version>.

TYPE: str

engine_version

Engine version string (Engine.VersionString).

TYPE: str

platform

OS platform the Resonite client runs on.

TYPE: ServerPlatform

is_wine

True when the client runs under Wine/Proton.

TYPE: bool

resonite_pid

Host PID of the engine process (Resonite.exe). The engine runs natively on Linux, so this is the real host kernel PID, usable with pgrep/os.kill. 0 if unavailable.

TYPE: int

renderer_pid

Host PID of the renderer process (Renderite.Renderer.exe), or 0 when headless / no renderer. This is the engine's direct child; under Proton it may be a launcher/wrapper PID rather than the literal renderer.

TYPE: int

resoio.info.ServerPlatform

Bases: Enum

OS platform the Resonite client runs on (mirrors FrooxEngine).