mirror of
https://github.com/snltty/linker.git
synced 2025-10-24 09:33:14 +08:00
30 lines
686 B
C#
30 lines
686 B
C#
using cmonitor.server.service.messengers.command;
|
|
using common.libs;
|
|
using MemoryPack;
|
|
|
|
namespace cmonitor.server.service.messengers.report
|
|
{
|
|
public sealed class CommandMessenger : IMessenger
|
|
{
|
|
public CommandMessenger()
|
|
{
|
|
}
|
|
|
|
|
|
[MessengerId((ushort)CommandMessengerIds.Exec)]
|
|
public void Exec(IConnection connection)
|
|
{
|
|
string[] commands = MemoryPackSerializer.Deserialize<string[]>(connection.ReceiveRequestWrap.Payload.Span);
|
|
Task.Run(() =>
|
|
{
|
|
CommandHelper.Windows(string.Empty, commands);
|
|
});
|
|
|
|
connection.Write(Helper.TrueArray);
|
|
}
|
|
|
|
|
|
}
|
|
|
|
}
|