update
This commit is contained in:
@@ -21,8 +21,8 @@ namespace RobotApp.Hubs
|
||||
// Phương thức này sẽ được gọi từ service để broadcast
|
||||
public async Task SendState(string serialNumber, StateMsg state)
|
||||
{
|
||||
var json = JsonSerializer.Serialize(state, JsonOptionExtends.Write);
|
||||
await Clients.Group(serialNumber).SendAsync("ReceiveState", json);
|
||||
//var json = JsonSerializer.Serialize(state, JsonOptionExtends.Write);
|
||||
await Clients.Group(serialNumber).SendAsync("ReceiveState", state);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,3 +12,7 @@ public class RobotMonitorHub : Hub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user