feat: 实现udp多端口

This commit is contained in:
2025-07-14 14:01:08 +08:00
parent 2894ee24be
commit ca906489c2
9 changed files with 53 additions and 92 deletions

View File

@@ -45,7 +45,7 @@ public class Power
public async ValueTask<Result<bool>> SetPowerOnOff(bool enable)
{
if (MsgBus.IsRunning)
await MsgBus.UDPServer.ClearUDPData(this.address, 1);
MsgBus.UDPServer.ClearUDPData(this.address, 1);
else return new(new Exception("Message Bus not work!"));
var ret = await UDPClientPool.WriteAddr(this.ep, 1, PowerAddr.PowerCtrl, Convert.ToUInt32(enable), this.timeout);