Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions RLBotCS/Server/FlatBuffersSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public readonly record struct DistributeBallPrediction(BallPredictionT BallPredi

public readonly record struct UpdateRendering(RenderingStatus Status) : SessionMessage;

public readonly record struct PingResponse() : SessionMessage;
public readonly record struct PingResponse(ulong Cookie) : SessionMessage;
}

class FlatBuffersSession
Expand Down Expand Up @@ -316,7 +316,9 @@ await _bridge.WriteAsync(
break;

case InterfaceMessage.PingRequest:
_incomingMessages.Writer.TryWrite(new SessionMessage.PingResponse());
_incomingMessages.Writer.TryWrite(
new SessionMessage.PingResponse(msg.MessageAsPingRequest().UnPack().Cookie)
);
break;
}

Expand Down Expand Up @@ -447,7 +449,9 @@ private async Task HandleInternalMessages()
break;
case SessionMessage.PingResponse m:
SendPayloadToClient(
CoreMessageUnion.FromPingResponse(new PingResponseT())
CoreMessageUnion.FromPingResponse(
new PingResponseT() { Cookie = m.Cookie }
)
);
break;
}
Expand Down
2 changes: 1 addition & 1 deletion flatbuffers-schema
Loading