MCPcopy Create free account
hub / github.com/facebook/time / SeqIDSocketControlMessage

Function SeqIDSocketControlMessage

timestamp/timestamp_linux.go:225–232  ·  view source on GitHub ↗

SeqIDSocketControlMessage encodes the SequenceID into a socket control message and specifies SCM_TS_OPT_ID as the Control Message Header type

(seqID uint32, soob []byte)

Source from the content-addressed store, hash-verified

223 h := (*unix.Cmsghdr)(unsafe.Pointer(&soob[0]))
224 h.Level = unix.SOL_SOCKET
225 h.Type = unix.SCM_TS_OPT_ID
226 h.SetLen(unix.CmsgLen(SizeofSeqID))
227 data := soob[unix.CmsgLen(0):unix.CmsgLen(SizeofSeqID)]
228 binary.NativeEndian.PutUint32(data, seqID)
229}
230
231// pollFunc matches unix.Ppoll so tests can drive the EINTR restart path
232type pollFunc func(fds []unix.PollFd, timeout *unix.Timespec, sigmask *unix.Sigset_t) (int, error)
233
234func waitForHWTS(connFd int) error {
235 return pollForHWTS(connFd, unix.Ppoll)

Callers 3

StartMethod · 0.92
sendMsgSeqIDTSMethod · 0.92

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…