BSGameLib.Networking 1.0.4-preview

This is a prerelease version of BSGameLib.Networking.
dotnet add package BSGameLib.Networking --version 1.0.4-preview
                    
NuGet\Install-Package BSGameLib.Networking -Version 1.0.4-preview
                    
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="BSGameLib.Networking" Version="1.0.4-preview" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BSGameLib.Networking" Version="1.0.4-preview" />
                    
Directory.Packages.props
<PackageReference Include="BSGameLib.Networking" />
                    
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 BSGameLib.Networking --version 1.0.4-preview
                    
#r "nuget: BSGameLib.Networking, 1.0.4-preview"
                    
#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 BSGameLib.Networking@1.0.4-preview
                    
#: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=BSGameLib.Networking&version=1.0.4-preview&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=BSGameLib.Networking&version=1.0.4-preview&prerelease
                    
Install as a Cake Tool

BSGameLib.Networking

Client and server networking for games, over QUIC. A packet is a plain class; a handler receives it on the other side. It sends reliably on a QUIC stream, or unreliably, optionally sequenced, as UDP datagrams beside the QUIC connection.

  • QUIC on Windows, Linux and macOS with nothing to install: BSGameLib.MsQuic.Native comes with it for Linux and macOS.
  • Packets are classes implementing IDataPacket, serialized from their public properties.
  • The client checks the server's certificate: trust on first use by default, or your own IServerIdentityVerifier, or a CA-signed certificate.
  • Keep-alive, round-trip times and traffic statistics; IPv4 and IPv6.
using BSGameLib.Networking;
using Microsoft.Extensions.Logging;

var logger = LoggerFactory.Create(_ => { }).CreateLogger("Client");

var packets = new SimpleDataPacketProvider();
packets.RegisterPacket<ChatPacket>();
var handlers = new SimpleDataPacketHandlerProvider();
handlers.RegisterHandler<ChatPacket>(new ChatHandler());

var client = new ClientAdapter(logger, new DataPacketManager(logger, packets, handlers),
  new NetworkAdapterConfiguration { Quic = new QuicTransportConfiguration() });
client.Connected += (_, _) => client.SendReliable(new ChatPacket { Sender = "Ann", Message = "Hello" });
client.Connect("localhost", 55237);

public class ChatPacket : IDataPacket
{
  public string Sender { get; set; }
  public string Message { get; set; }
}

public class ChatHandler : IDataPacketHandler<ChatPacket>
{
  public void Handle(INetConnection connection, ChatPacket packet) =>
    Console.WriteLine($"[{packet.Sender}] {packet.Message}");
}

For a dedicated server, BSGameLib.Server sets up the server side for you.

Documentation: https://docs.burningstormstudios.com/

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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 (1)

Showing the top 1 NuGet packages that depend on BSGameLib.Networking:

Package Downloads
BSGameLib.Server

A dedicated game server host on Microsoft.Extensions.Hosting: finds your game's handlers and services, registers them for dependency injection, listens over QUIC and runs a fixed-step game loop, as a console app or a systemd or Windows service.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.4-preview 54 11/9/2026