SetNet.MessagePack
1.1.0
See the version list below for details.
dotnet add package SetNet.MessagePack --version 1.1.0
NuGet\Install-Package SetNet.MessagePack -Version 1.1.0
<PackageReference Include="SetNet.MessagePack" Version="1.1.0" />
<PackageVersion Include="SetNet.MessagePack" Version="1.1.0" />
<PackageReference Include="SetNet.MessagePack" />
paket add SetNet.MessagePack --version 1.1.0
#r "nuget: SetNet.MessagePack, 1.1.0"
#:package SetNet.MessagePack@1.1.0
#addin nuget:?package=SetNet.MessagePack&version=1.1.0
#tool nuget:?package=SetNet.MessagePack&version=1.1.0
<p align="center"> <img src="https://raw.githubusercontent.com/Povstalez/SetNet/master/assets/icon.png" alt="SetNet" width="96"> </p>
SetNet.MessagePack
MessagePack serializer for SetNet.
The SetNet core library ships serializer-agnostic (it bundles no serializer). This package provides MessagePackNetSerializer — an ISerializer backed by MessagePack and hardened with the UntrustedData security profile (hash-collision protection and recursion-depth limits) to mitigate deserialization denial-of-service on payloads arriving off the network.
Install
dotnet add package SetNet
dotnet add package SetNet.MessagePack
Usage
Register it once at startup, before connecting:
using SetNet.Messaging;
using SetNet.MessagePack;
SetNetSerializer.Use(new MessagePackNetSerializer());
That's it — SetNet now serializes on send and deserializes on receive (handing your typed handlers the decoded message) through MessagePack.
Your message DTOs must be MessagePack-serializable:
[MessagePackObject]
public class ChatMessage
{
[Key(0)] public string Text { get; set; } = "";
}
(or use [MessagePackObject(true)] for key-as-name).
Unity / IL2CPP / AOT: MessagePack needs pre-generated formatters on AOT targets (run the
mpcgenerator and register the resolver). On Mono/desktop it works out of the box. If AOT setup is a blocker, you can instead supply any otherISerializertoSetNetSerializer.Use(...).
Documentation & source
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- MessagePack (>= 3.1.7)
- SetNet (>= 1.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.