NalchiSharp is a C# binding for the nalchi, which aims to provide utilities for efficient message sending over ValveSoftware/GameNetworkingSockets.
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 usesPascalCase
&camelCase
. - In NalchiSharp, functions in
nalchi::socket_extension
is implemented as the extension methods ofGnsSharp.ISteamNetworkingSockets
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.
I don't provide them here, for the same reason as in GnsSharp.
So, bring your own native dll/dylib/so files:
- Build the GameNetworkingSockets on your own, or download the Steamworks SDK from the Steamworks partner site.
- Also, build the C++ version of nalchi dynamically and bring that dll/dylib/so file too.
You can download the pre-built native libraries in nalchi repository.
Download the one for your platform, that ends with -Shared
.