refactor(client): capture send timestamp before socket call

Record the send timestamp immediately before the socket operation to include local enqueue overhead in RTT measurements, providing more conservative latency data for consumers.
This commit is contained in:
Nils Andreas Svee committed 2026-04-28 22:38:08 +07:00
1 parent 6782f7b741
commit 899506dc64
4 files changed
+11 -9

No files matched your search

+2 -1
View File
@@ -692,7 +692,8 @@ The following configuration parameters affect protocol behavior:
- **Client send timestamp:** SHOULD be captured as close as possible to the
send system call. For best RTT accuracy, the timestamp should be taken
immediately after the send call returns.
immediately before the send call, so that the measured RTT includes any
local send/enqueue overhead.
- **Client receive timestamp:** SHOULD be captured as close as possible to
the receive system call return, before any packet processing.
- **Server timestamps:** Determined by the negotiated StampAt parameter: