Skip to content

nalchi-net/NalchiSharp

Repository files navigation

NalchiSharp

NalchiSharp is a C# binding for the nalchi, which aims to provide utilities for efficient message sending over ValveSoftware/GameNetworkingSockets.

Documentation

As this is a direct binding of the nalchi, you can refer to the nalchi API reference for more info.

There are some minor differences:

  • nalchi is written in C++, so it uses snake_case mostly, while NalchiSharp uses PascalCase & camelCase.
  • In NalchiSharp, functions in nalchi::socket_extension is implemented as the extension methods of GnsSharp.ISteamNetworkingSockets

Integrate

There are 8 different nuget packages available for different backends & platforms.

dotnet add package NalchiSharp.Gns.Win64 --prerelease           # Open source GNS for Windows 64-bit
dotnet add package NalchiSharp.Gns.Win32 --prerelease           # Open source GNS for Windows 32-bit
dotnet add package NalchiSharp.Gns.Posix64 --prerelease         # Open source GNS for POSIX 64-bit
dotnet add package NalchiSharp.Gns.Posix32 --prerelease         # Open source GNS for POSIX 32-bit
dotnet add package NalchiSharp.Steamworks.Win64 --prerelease    # Steamworks SDK for Windows 64-bit
dotnet add package NalchiSharp.Steamworks.Win32 --prerelease    # Steamworks SDK for Windows 32-bit
dotnet add package NalchiSharp.Steamworks.Posix64 --prerelease  # Steamworks SDK for POSIX 64-bit
dotnet add package NalchiSharp.Steamworks.Posix32 --prerelease  # Steamworks SDK for POSIX 32-bit

This is because GNS uses different struct pack size for each platform, and size_t is different between 64/32 bits.

Where's the native libraries?

I don't provide them here, for the same reason as in GnsSharp.

So, bring your own native dll/dylib/so files:

Can you provide the pre-built native libraries?

You can download the pre-built native libraries in nalchi repository.
Download the one for your platform, that ends with -Shared.

About

C# binding for nalchi

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages