ValveSoftware / ValveSoftware/GameNetworkingSockets

Clarification request for dedicated servers using AllocateMessage (steamworks sdk version)

Open
#386 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

steamworks
Dominant language
C++
Stars
9.9k
Forks
749
Avg merge
1d 2h
Merged PRs (30d)
1

Description

Hello, thank you for the work on this product :)

I'm revising a dedicated server program, build using the steamworks sdk version of GameNetworkingSockets.
I believe there to be the following inconsistency with the API or documentation:

  • ISteamNetworkingUtils_AllocateMessage is required to create a message in which you can set the outbound lane. The m_idxLane must be written into the structure.

  • Steamworks SDK comes with two init methods, SteamAPI_Init and, SteamInternal_GameServer_Init_V2
    Since it is a dedicated server, we use the last one.

  • The gameserver variant does not initialize the ISteamNetworkingUtils interface required to use the first mentioned function, despite SteamGameServer_InitEx ensuring it has the correct version of the interface present in the installed version of steam.

The code will build and run just fine, however, it makes an error message when accessing the interface
[S_API FAIL] Tried to access Steam interface SteamNetworkingUtils004 before SteamAPI_Init succeeded.
This is using the linux libsteam_api.so

There is only one function to access ISteamNetworkingUtils, which is the client version. Since for every other interface needed to build a dedicated server, they have a corresponding SteamGameServer_ prefixed interface function. Indeed, the steamworks documentation (https://partner.steamgames.com/doc/sdk/api : Steam Game Servers), does not mention a gameserver version of ISteamNetworkingUtils becoming available.

I do not know if this is causing internal errors in the steamworks_api, even though it seems to run fine.
SteamAPI_Init makes the message go away, but checks for a running steam desktop client, so I won't use it in the server program.

The same thing was also noticed here, which I assume the root cause is the same:
https://github.com/Facepunch/Facepunch.Steamworks/issues/630

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing ISteamNetworkingUtils_AllocateMessage with the SteamAPI_Init and SteamInternal_GameServer_Init_V2 initialization paths in the Steamworks SDK, using the Linux libsteam_api.so behavior described here. Check the Steam Game Servers documentation and the related Facepunch.Steamworks issue; done means clarifying whether the gameserver path supports this interface and documenting or correcting the supported usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.