在 AiVideo 中能看到图像
增加了在线状态同步逻辑
This commit is contained in:
20
SHH.CameraDashboard/Services/Payloads/RegisterProcessor.cs
Normal file
20
SHH.CameraDashboard/Services/Payloads/RegisterProcessor.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using MessagePack;
|
||||
using SHH.CameraDashboard;
|
||||
using SHH.CameraDashboard.Services;
|
||||
using SHH.Contracts;
|
||||
|
||||
public class RegisterProcessor : IProtocolProcessor
|
||||
{
|
||||
public string ProtocolType => ProtocolHeaders.ServerRegister;
|
||||
|
||||
private readonly CommandBusClient _bus;
|
||||
|
||||
public RegisterProcessor(CommandBusClient bus) => _bus = bus;
|
||||
|
||||
public void Process(byte[] identity, byte[] payloadBytes)
|
||||
{
|
||||
var p = MessagePackSerializer.Deserialize<RegisterPayload>(payloadBytes);
|
||||
_bus.UpdateSession(p.InstanceId, identity);
|
||||
_bus.RaiseServerRegistered(p);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user