Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Wrap Datagram Game Coordinator SDK #375

Open
StagnationPoint opened this issue Sep 4, 2020 · 0 comments
Open

Request: Wrap Datagram Game Coordinator SDK #375

StagnationPoint opened this issue Sep 4, 2020 · 0 comments

Comments

@StagnationPoint
Copy link

Hi!

As you know, Steam offers the option to make dedicated gameservers available via SDR. In the past, this required hosting the gameserver in one of Valve's datacenters. This year, they rolled out support for hosting SDR-connected dedicated gameservers in Azure, Google Cloud, or AWS.

I've signed up with Valve for this beta program, but I'm still working through how to implement it. So far, I believe that some required functionality is missing from Steamworks.NET.

In order for a client to talk to an SDR-connected dedicated gameserver, the game backend must first generate a SteamDatagramRelayAuthTicket and sign it using a secret key[0], which yields a SteamDatagramSignedBlob, then pass that blob to the client[1]. AFAICT, this signing functionality is not present in the standard SDK. Instead, they placed it in this SDK[2].

The SDK is very small. If you look in its /include/steam/steamdatagram_gamecoordinator.h file you'll see one struct and a pair of functions that are important for this use case:

  • struct SteamDatagramSignedBlob
  • bool SteamDatagram_InitTicketGenerator_Ed25519()
  • bool SteamDatagram_SerializeAndSignTicket()

I see two convenience functions that appear to be duplicates of functions that are in the standard SDK, but I haven't verified that they behave the same:

  • bool SteamDatagram_ParsePingLocation()
  • int SteamDatagram_EstimatePingBetweenTwoLocations()

And I don't believe that this use case requires the following (but I've been wrong before :-)

  • bool SteamDatagram_CreateCert()
  • bool SteamDatagram_ParseHostedServerLogin()

Would it be possible for the required struct and functions to be wrapped by Steamworks.NET?

Thank you!

[0] From their documentation, "When your game coordinator is ready to authorize a client to connect to a server, it generates a SteamDatagramRelayAuthTicket and signs it with your secret key. This ticket authorizes a specific client to talk to a specific gameserver, for a limited amount of time. It also contains the encrypted routing information. The game coordinator sends the ticket to the client."

[1] I'm not 100% clear on what the client does with this. The comments in the header file in the SDK say "The resulting blob should be sent to the client, who will put it in their ticket cache using ISteamNetworkingSockets::ReceivedRelayAuthTicket". Sounds fine, but ReceivedRelayAuthTicket() takes a SteamDatagramRelayAuthTicket, not a SteamDatagramSignedBlob. What do I do, just cast the thing? I'll try it and see what happens.

[2] I found this link at https://partner.steamgames.com/doc/features/multiplayer/steamdatagramrelay#8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant