mirror of
https://github.com/modernuo/ModernUO
synced 2026-08-11 22:23:06 -04:00
16 lines
437 B
C#
16 lines
437 B
C#
using System;
|
|
using System.Net.Sockets;
|
|
using Server.Network;
|
|
|
|
namespace Server.Tests.Network
|
|
{
|
|
public static class PacketTestUtilities
|
|
{
|
|
public static Span<byte> Compile(this Packet p) =>
|
|
p.Compile(false, out var length).AsSpan(0, length);
|
|
|
|
public static NetState CreateTestNetState() => new(
|
|
new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
|
|
);
|
|
}
|
|
}
|