From ef294c05d888beddd45b1e7fd926f1bee4ab2306 Mon Sep 17 00:00:00 2001 From: juan <76052920+jnslol@users.noreply.github.com> Date: Sat, 3 Oct 2026 17:30:35 -0300 Subject: [PATCH] Linux: sockets v013/v012 fallback + Steam lib docs - SDK 1.65 provides GameServerNetworkingSockets v013, Skate DLL v012; try v013 then v012 (superset, same methods used) - verified live: sign-in, Steam ID, join code, clean shutdown - README: steamclient sdk64 symlink, version fallback note --- .../Multiplayer/Steam/steam_transport.cpp | 27 ++++++++++++++++--- Server/README-linux.md | 8 +++--- 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/Extension/Multiplayer/Steam/steam_transport.cpp b/Extension/Multiplayer/Steam/steam_transport.cpp index a0c0f4b..c8bd598 100644 --- a/Extension/Multiplayer/Steam/steam_transport.cpp +++ b/Extension/Multiplayer/Steam/steam_transport.cpp @@ -343,7 +343,17 @@ bool SteamTransport::open() { } catch (...) { p.friends = nullptr; } - return bind(module, symbol(module, "SteamAPI_SteamNetworkingSockets_SteamAPI_v012")(), + void *sockets = nullptr; + for (const char *name : {"SteamAPI_SteamNetworkingSockets_SteamAPI_v013", + "SteamAPI_SteamNetworkingSockets_SteamAPI_v012"}) { + try { + sockets = symbol(module, name)(); + break; + } catch (...) { + } + } + if (!sockets) throw std::runtime_error("Missing Steam export: SteamAPI_SteamNetworkingSockets_SteamAPI"); + return bind(module, sockets, symbol(module, "SteamAPI_SteamNetworkingUtils_SteamAPI_v004")()); } catch (const std::exception &e) { p.state.detail = e.what(); @@ -367,8 +377,19 @@ bool SteamTransport::open_game_server(void *library) { const auto find = symbol(module, "SteamInternal_FindOrCreateGameServerInterface"); // Game servers have no friends list; names come from each player's hello. p.friends = nullptr; - return bind(module, symbol(module, "SteamAPI_SteamGameServerNetworkingSockets_SteamAPI_v012")(), - find(user, "SteamNetworkingUtils004")); + // Sockets v012 (Skate's Windows DLL) vs v013 (current SDK): same methods + // used here, v013 is a superset. Try new first, fall back to old. + void *sockets = nullptr; + for (const char *name : {"SteamAPI_SteamGameServerNetworkingSockets_SteamAPI_v013", + "SteamAPI_SteamGameServerNetworkingSockets_SteamAPI_v012"}) { + try { + sockets = symbol(module, name)(); + break; + } catch (...) { + } + } + if (!sockets) throw std::runtime_error("Missing Steam export: SteamAPI_SteamGameServerNetworkingSockets_SteamAPI"); + return bind(module, sockets, find(user, "SteamNetworkingUtils004")); } catch (const std::exception &e) { p.state.detail = e.what(); return false; diff --git a/Server/README-linux.md b/Server/README-linux.md index b8725b7..5ad460d 100644 --- a/Server/README-linux.md +++ b/Server/README-linux.md @@ -18,7 +18,8 @@ the release ZIP is expected to ship them; this repo never vendors Valve binaries - `libsteam_api.so`: from the Steamworks SDK `redistributable_bin/linux64/` (official download via `partner.steamgames.com`; any recent 1.x works — the server - uses stable flat exports `SteamGameServer015`/`SteamNetworkingSockets012`). + tries `SteamGameServerNetworkingSockets_SteamAPI_v013` then `v012`, and uses + stable flat exports `SteamGameServer015`/`SteamNetworkingUtils004`). It is generic; the app is selected at runtime via `SteamAppId=3354750`. - `steamclient.so` (+ `tier0`/`vstdlib` if present): **not** in the SDK. Get it from SteamCMD or a Steam client install, e.g.: @@ -28,8 +29,9 @@ the release ZIP is expected to ship them; this repo never vendors Valve binaries # next to ReSkateServer (same folder as libsteam_api.so) ``` or copy/symlink an existing client copy (`~/.steam/steam/linux64/steamclient.so`, - Valve also documents `~/.steam/sdk64/steamclient.so`). The server `dlopen`s - `libsteam_api.so`, which in turn loads `steamclient.so`; either adjacent or + Valve also documents `~/.steam/sdk64/steamclient.so` — the server looks there, + so `ln -s /steamclient.so ~/.steam/sdk64/steamclient.so` works). + The server `dlopen`s `libsteam_api.so`, which in turn loads `steamclient.so`; either adjacent or `LD_LIBRARY_PATH` works. Arch/CachyOS: