Stormancer.Server.Plugins.GameSession 6.2.1.86

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Stormancer.Server.Plugins.GameSession --version 6.2.1.86
                    
NuGet\Install-Package Stormancer.Server.Plugins.GameSession -Version 6.2.1.86
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Stormancer.Server.Plugins.GameSession" Version="6.2.1.86" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Stormancer.Server.Plugins.GameSession" Version="6.2.1.86" />
                    
Directory.Packages.props
<PackageReference Include="Stormancer.Server.Plugins.GameSession" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Stormancer.Server.Plugins.GameSession --version 6.2.1.86
                    
#r "nuget: Stormancer.Server.Plugins.GameSession, 6.2.1.86"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Stormancer.Server.Plugins.GameSession@6.2.1.86
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Stormancer.Server.Plugins.GameSession&version=6.2.1.86
                    
Install as a Cake Addin
#tool nuget:?package=Stormancer.Server.Plugins.GameSession&version=6.2.1.86
                    
Install as a Cake Tool

This plugin adds support for P2P & client-server game sessions to a Stormancer application. It supports:

  • P2P and Client/Server game sessions
  • Electing an host in P2P game sessions
  • Managing game servers (requires adding ServerPools.hpp to the game server)
  • Game session startup/shutdown events
  • Game session results aggregation and processing in P2P (allows comparing game results from all peers) and Client/server (only the server sends game results)
  • Public or access restricted game sessions.

Setting up game servers

The gamesession system supports starting game servers to run the game session.

Development game servers

The development game server pool enables gamesessions to wait for the connection of a non authenticated gameserver to host the game session. This enables starting the game server manually from a developer computer, in the debugger or on the cmd prompt.The clients and game server uses the normal P2P connectivity system, supporting NAT traversal. This avoids the need of any configuration on the developer network.

ctx.HostStarting += (IHost host) =>
{
    [...]

    //Declares a development server pool named dev.
    host.ConfigureServerPools(c => c.DevPool("dev"));

    //Declares a gamesession type using the pool configured above.
    host.ConfigureGameSession("gamesession-server", c => c
        .UseGameServer(c => c
            .PoolId("dev")
            )
        .CustomizeScene(scene=>scene.AddSocket())
    );

    [...]
}

Hosting game servers on local docker

The docker server pool enables game servers to be run as docker container on Stormancer cluster. Containers are automatically started on the node running the less game instances. Other policies could be put in place if necessary.

ctx.HostStarting += (IHost host) =>
{
    [...]

    //Declares a docker server pool named docker, that uses the image 'game-server-image:latest'
    host.ConfigureServerPools(c => c.DockerPool("docker", b => b.Image("game-server-image:latest")));

    //Declares a gamesession type using the pool configured above.
    host.ConfigureGameSession("gamesession-server", c => c
        .UseGameServer(c => c
            .PoolId("docker")
            )
        .CustomizeScene(scene=>scene.AddSocket())
    );

    [...]
}

Other tasks are required to host game servers on docker:

Grid configuration

For the game servers to connect to the Stormancer cluster from inside docker containers, the grid nodes must not be bound to localhost. They must publish public, or at least LAN IP addresses. To do that, in the node configuration file, set both publicIp and loadbalancedIp to an interface accessible by docker containers, for instance:

{
    "constants": {
        "host-ip" : "xxx.xxx.xxx.xxx"
        "publicIp": "{host-ip}",
        "loadBalancedIp": "{host-ip}",
        [...]

Stormancer needs to associate local ports to the game server. To specify the range of ports to use, a delegated transport entry must be added to the grid nodes configuration:

[...]

"endpoints": {
    //udp transport
    "udp1": {
        "type": "raknet",
        "port": "{udpPort}",
        "maxConnections": 100,
        "publicEndpoint": "{publicIp}:{udpPort}"
    },
    
    [...]
    
    //delegated transport, allows specifying a pool of ports.
    "public1": {
        "type": "delegated",
        "publicEndpoint": "{publicIp}",
        "ports": {
        "min": 42000,
        "max": 44000

        }

    }
},
[...]

The node firewall must be opened for UDP in the range specified (42000-44000 in the example).

Secrets

Docker servers authentify with the grid using an encrypted token using the aes-gcm algorithm. The encryption key is stored in a cluster secret store that must be created manually. The path to the key is specified in the application' configuration in the gameServer dataProtection policy:

{
    [...]

    "dataProtection":{
	    "gameServer":{
		    "provider":"aes-gcm",
		    "key":"my-account/my-secret-store/gameServer",
		    "createKeyIfNotExists":true
	    }
        [...]
    }
}

The secrets store must be created prior to application start. If the CLI plugin Stormancer.Management.CLI is installed, it can be created using the following command:

> dotnet tool run stormancer manage secrets-store create --cluster test --account my-account --id my-secret-store

Analytics

The plugin produces the following analytics:

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (9)

Showing the top 5 NuGet packages that depend on Stormancer.Server.Plugins.GameSession:

Package Downloads
Stormancer.Server.Plugins.Party

Provides Party related features to a Stormancer server application.

Stormancer.Server.Plugins.GameFinder

Provides Gamefinder features to a Stormancer server application.

Stormancer.Server.Plugins.GameHistory

Game history system for Stormancer server applications.

Stormancer.Server.Plugins.Spectate

Provides game data streaming APIs for replay or realtime spectate.

Stormancer.Server.Plugins.Replication

Provides server services required for object replication.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
6.3.1-pre 75 1/20/2026
6.3.0-pre 172 12/5/2025
6.2.2.5-pre 222 10/10/2025
6.2.2.2-pre 230 8/27/2025
6.2.2.1-pre 364 5/9/2025
6.2.2-pre 158 4/25/2025
6.2.1.95-pre 78 1/18/2026
6.2.1.94-pre 83 1/5/2026
6.2.1.93-pre 146 7/30/2025
6.2.1.92-pre 191 6/4/2025
6.2.1.91-pre 188 6/4/2025
6.2.1.90-pre 189 6/3/2025
6.2.1.89-pre 184 6/3/2025
6.2.1.88-pre 181 6/3/2025
6.2.1.87-pre 185 6/3/2025
6.2.1.86 296 3/3/2025
6.2.1.86-pre 321 3/3/2025
6.2.1.85 332 2/28/2025
6.2.1.85-pre 210 12/20/2024
6.2.1.84-pre 211 10/25/2024
6.2.1.83-pre 160 10/15/2024
6.2.1.82-pre 386 9/30/2024
6.2.1.81-pre 403 9/26/2024
6.2.1.80-pre 350 8/28/2024
6.2.1.76-pre 181 8/9/2024
6.2.1.75-pre 185 8/9/2024
6.2.1.74-pre 166 8/9/2024
6.2.1.73-pre 171 8/9/2024
6.2.1.72-pre 201 8/2/2024
6.2.1.71-pre 571 6/10/2024
6.2.1.70-pre 335 4/17/2024
6.2.1.69-pre 180 4/17/2024
6.2.1.65-pre 225 4/16/2024
6.2.1.63-pre 350 4/2/2024
6.2.1.61-pre 373 3/11/2024
6.2.1.59-pre 193 1/17/2024
6.2.1.58-pre 202 1/12/2024
6.2.1.57-pre 383 12/11/2023
6.2.1.56-pre 205 12/7/2023
6.2.1.55-pre 301 12/1/2023
6.2.1.53-pre 301 11/22/2023
6.2.1.52-pre 375 11/20/2023
6.2.1.51-pre 144 11/15/2023
6.2.1.50-pre 176 11/14/2023
6.2.1.49-pre 182 11/14/2023
6.2.1.48-pre 188 11/14/2023
6.2.1.47-pre 172 11/14/2023
6.2.1.46-pre 185 11/13/2023
6.2.1.45-pre 169 11/13/2023
6.2.1.44-pre 167 11/13/2023
6.2.1.43-pre 174 11/12/2023
6.2.1.42-pre 195 11/12/2023
6.2.1.41-pre 175 11/12/2023
6.2.1.40-pre 187 11/12/2023
6.2.1.39-pre 180 11/12/2023
6.2.1.38-pre 169 11/12/2023
6.2.1.37-pre 170 11/12/2023
6.2.1.36-pre 214 11/12/2023
6.2.1.35-pre 235 11/11/2023
6.2.1.33-pre 213 11/8/2023
6.2.1.31-pre 162 11/7/2023
6.2.1.30-pre 187 11/7/2023
6.2.1.28-pre 249 10/27/2023
6.2.1.27-pre 225 10/27/2023
6.2.1.26-pre 186 10/27/2023
6.2.1.25-pre 184 10/27/2023
6.2.1.24-pre 297 10/27/2023
6.2.1.23-pre 284 10/25/2023
6.2.1.22-pre 177 10/23/2023
6.2.1.21-pre 176 10/20/2023
6.2.1.20-pre 186 10/20/2023
6.2.1.19-pre 288 10/20/2023
6.2.1.18-pre 171 10/20/2023
6.2.1.17-pre 192 10/20/2023
6.2.1.15-pre 175 10/19/2023
6.2.1.14-pre 265 10/19/2023
6.2.1.13-pre 265 10/13/2023
6.2.1.12-pre 176 10/13/2023
6.2.1.10-pre 230 10/12/2023
6.2.1.9-pre 193 10/12/2023
6.2.1.7-pre 202 10/11/2023
6.2.1.6-pre 170 10/11/2023
6.2.1.4-pre 195 10/11/2023
6.2.1.3-pre 188 10/11/2023
6.2.1.2-pre 243 10/10/2023
6.2.1.1-pre 237 10/5/2023
6.2.1-pre 358 10/4/2023
6.2.0.14-pre 192 10/2/2023
6.2.0.13-pre 222 9/29/2023
6.2.0.12-pre 185 9/28/2023
6.2.0.11-pre 355 9/12/2023
6.2.0.10-pre 226 9/8/2023
6.2.0.9-pre 219 9/7/2023
6.2.0.8-pre 208 9/1/2023
6.2.0.7-pre 174 8/31/2023
6.2.0.6-pre 236 8/29/2023
6.2.0.5-pre 435 8/18/2023
6.2.0.4-pre 287 8/18/2023
6.2.0.3-pre 258 8/17/2023
6.2.0.2-pre 223 8/17/2023
6.2.0-pre 243 8/9/2023
6.1.2.35-pre 224 8/4/2023
6.1.2.34-pre 283 8/3/2023
6.1.2.33-pre 328 8/1/2023
6.1.2.32-pre 234 8/1/2023
6.1.2.31-pre 437 6/29/2023
6.1.2.30-pre 279 6/29/2023
6.1.2.29-pre 616 6/15/2023
6.1.2.28-pre 246 6/15/2023
6.1.2.27-pre 236 6/15/2023
6.1.2.26-pre 244 6/15/2023
6.1.2.25-pre 237 6/15/2023
6.1.2.24-pre 260 6/15/2023
6.1.2.23-pre 244 6/15/2023
6.1.2.22-pre 232 6/15/2023
6.1.2.21-pre 250 6/15/2023
6.1.2.20-pre 224 6/15/2023
6.1.2.19-pre 260 6/15/2023
6.1.2.18-pre 429 6/6/2023
6.1.2.17-pre 286 6/6/2023
6.1.2.15-pre 313 5/30/2023
6.1.2.14-pre 454 5/24/2023
6.1.2.13-pre 346 5/18/2023
6.1.2.12-pre 229 5/18/2023
6.1.2.11-pre 242 5/18/2023
6.1.2.10-pre 295 5/17/2023
6.1.2.8-pre 275 5/15/2023
6.1.2.7-pre 314 5/12/2023
6.1.2.6-pre 265 5/11/2023
6.1.2.5-pre 241 5/11/2023
6.1.2.4-pre 269 5/11/2023
6.1.2.3-pre 250 5/11/2023
6.1.2.2-pre 276 5/11/2023
6.1.2.1-pre 437 5/9/2023
6.1.2-pre 258 5/9/2023
6.1.1.15 505 5/9/2023
6.1.1.15-pre 255 5/5/2023
6.1.1.14-pre 227 5/5/2023
6.1.1.13-pre 218 4/30/2023
6.1.1.12-pre 281 4/30/2023
6.1.1.11-pre 225 4/27/2023
6.1.1.10-pre 288 4/24/2023
6.1.1.9-pre 285 4/21/2023
6.1.1.8-pre 235 4/21/2023
6.1.1.7-pre 279 4/21/2023
6.1.1.6-pre 276 4/21/2023
6.1.1.3-pre 291 4/13/2023
6.1.1.2-pre 251 4/13/2023
6.1.1.1-pre 263 4/13/2023
6.1.0.20-pre 299 4/11/2023
6.1.0.19-pre 249 4/7/2023
6.1.0.18-pre 266 4/6/2023
6.1.0.17 646 4/4/2023
6.1.0.17-pre 294 3/31/2023
6.1.0.16-pre 249 3/31/2023
6.1.0.15-pre 266 3/30/2023
6.1.0.13-pre 245 3/30/2023
6.1.0.12-pre 281 3/29/2023
6.1.0.11-pre 266 3/29/2023
6.1.0.10-pre 283 3/29/2023
6.1.0.9-pre 267 3/29/2023
6.1.0.8-pre 272 3/29/2023
6.1.0.7-pre 266 3/29/2023
6.1.0.6-pre 248 3/29/2023
6.1.0.5-pre 257 3/28/2023
6.1.0.4-pre 256 3/28/2023
6.1.0.3-pre 256 3/21/2023
6.1.0.2-pre 281 3/21/2023
6.1.0.1-pre 298 3/19/2023
6.1.0-pre 273 3/19/2023
6.0.3.6-pre 671 12/8/2022
6.0.3.5-pre 261 12/8/2022
6.0.3.4-pre 247 12/7/2022
6.0.3.3-pre 243 12/7/2022
6.0.3.2-pre 305 12/7/2022
6.0.3.1-pre 290 12/7/2022
6.0.3-pre 273 12/6/2022
6.0.2 551 10/28/2022
6.0.1.1 1,146 10/26/2022
6.0.1.1-pre 292 10/26/2022
6.0.0.3-pre 290 10/3/2022
6.0.0.2 1,676 9/28/2022
6.0.0.2-pre 601 9/12/2022
5.5.0.11-pre 682 8/2/2022
5.5.0.10-pre 310 7/27/2022
5.5.0.9-pre 643 7/1/2022
5.5.0.8-pre 422 6/9/2022
5.5.0.3-pre 308 5/24/2022
5.4.0.60-pre 753 4/12/2022
5.4.0.59-pre 353 4/12/2022
5.4.0.58-pre 373 3/31/2022
5.4.0.57-pre 325 3/31/2022
5.4.0.56-pre 331 3/24/2022
5.4.0.55-pre 343 3/23/2022
5.4.0.53-pre 354 3/22/2022
5.4.0.51-pre 515 3/15/2022
5.4.0.26-pre 330 3/14/2022
5.4.0.25-pre 323 3/14/2022
5.4.0.23-pre 343 3/8/2022
5.4.0.22-pre 333 3/1/2022
5.4.0.7-pre 490 2/28/2022
5.3.0.104-pre 312 3/17/2022
5.3.0.103-pre 327 3/17/2022
5.3.0 3,026 1/21/2022
5.3.0-pre 762 1/14/2022
5.2.0 1,759 12/15/2021
5.2.0-pre 532 10/26/2021
5.1.0.1 1,129 10/14/2021
5.0.1.2 1,522 5/23/2021
5.0.1.2-pre 1,088 5/12/2021
5.0.1-pre 501 5/3/2021
4.0.7 1,275 4/29/2021
4.0.6 645 4/19/2021
4.0.5 673 3/22/2021
4.0.4.1 984 3/20/2021
4.0.4 1,484 3/1/2021
4.0.3.2 658 12/18/2020
4.0.3.2-pre 559 12/17/2020
4.0.3.1-pre 496 12/17/2020
4.0.3-pre 537 12/17/2020
4.0.1.1 1,168 12/9/2020
4.0.0.1 1,419 12/4/2020
3.3.4 688 12/9/2020
3.3.3.2 702 12/8/2020
3.3.3.2-pre 513 12/8/2020
3.3.2.2 1,399 10/20/2020
3.3.2.2-pre 696 10/13/2020
3.3.2.1-pre 603 9/29/2020
3.3.2-pre 1,277 8/11/2020
3.3.1.1-pre 581 8/11/2020
3.3.1-pre 510 8/11/2020
3.3.0-pre 564 7/1/2020
3.2.3-pre 538 6/30/2020
3.2.2-pre 541 6/23/2020
3.2.1-pre 580 6/22/2020
3.2.0-pre 687 6/16/2020
3.1.3-pre 578 6/15/2020
3.1.2-pre 608 6/9/2020
3.0.2 730 6/15/2020
3.0.2-pre 617 6/5/2020
3.0.1 1,621 5/27/2020
3.0.1-pre 1,042 3/30/2020
3.0.0-pre 1,397 3/29/2020
2.0.0.3 798 2/20/2020
2.0.0.3-pre 1,142 2/22/2020
2.0.0.2 785 2/19/2020
2.0.0.1 1,390 2/19/2020
2.0.0 1,062 2/13/2020
1.2.1-alpha.2 482 2/19/2020
1.2.1-alpha.1 494 1/27/2020
1.1.1 1,185 1/21/2020
1.1.1-alpha.1 486 2/19/2020
1.0.0.3 1,371 1/4/2020
1.0.0.2 851 1/4/2020
1.0.0.1 1,343 1/4/2020

Changed
*******
- Update dependencies to release version