Skip to content

Commit

Permalink
Add Timestamp back to LCG LiveControl ping
Browse files Browse the repository at this point in the history
  • Loading branch information
hhvrc committed Nov 18, 2024
1 parent 998ad02 commit 7f8dfe2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Common/Models/WebSocket/LCG/LcgLiveControlPing.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace OpenShock.Common.Models.WebSocket.LCG;

public sealed class LcgLiveControlPing
{
public required long Timestamp { get; set; } // Was used for latency calculation, latency calculation is now done serverside
}
5 changes: 4 additions & 1 deletion LiveControlGateway/Controllers/LiveControlController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,10 @@ private async Task SendPing()
await QueueMessage(new Common.Models.WebSocket.BaseResponse<LiveResponseType>
{
ResponseType = LiveResponseType.Ping,
Data = new object {} // No data for now
Data = new LcgLiveControlPing
{
Timestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()
}
});
}

Expand Down

0 comments on commit 7f8dfe2

Please sign in to comment.