
- From instead of Into - unsafe_data_ref for other payloads - CByteSlice for returning memory spans - send Packet instead of Into<Packet> - expose packet layer to C/C#
17 lines
402 B
C#
17 lines
402 B
C#
using System.Diagnostics.CodeAnalysis;
|
|
|
|
namespace ServicePoint2;
|
|
|
|
public static class ServicePoint2Extensions
|
|
{
|
|
public static Packet IntoPacket(this Command command)
|
|
{
|
|
return Packet.FromCommand(command);
|
|
}
|
|
|
|
public static bool TryIntoCommand(this Packet packet, [MaybeNullWhen(false)] out Command command)
|
|
{
|
|
return Command.TryFromPacket(packet, out command);
|
|
}
|
|
}
|