Initial commit
This commit is contained in:
commit
137cb2ce13
215 changed files with 659023 additions and 0 deletions
13
src/GameCult.Networking/NetPeerExtensions.cs
Normal file
13
src/GameCult.Networking/NetPeerExtensions.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
using LiteNetLib;
|
||||
using MessagePack;
|
||||
|
||||
namespace GameCult.Networking
|
||||
{
|
||||
public static class NetPeerExtensions
|
||||
{
|
||||
public static void Send<T>(this NetPeer peer, T message) where T : Message
|
||||
{
|
||||
peer.Send(MessagePackSerializer.Serialize(message), DeliveryMethod.ReliableOrdered);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue