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

Function IPToSockaddr

timestamp/timestamp.go:188–197  ·  view source on GitHub ↗

IPToSockaddr converts IP + port into a socket address Somewhat copy from https://github.com/golang/go/blob/16cd770e0668a410a511680b2ac1412e554bd27b/src/net/ipsock_posix.go#L145

(ip net.IP, port int)

Source from the content-addressed store, hash-verified

186 return bbuf, boob, saddr, nil
187}
188
189// ReadRXTimestamp returns HW timestamp from CMSG buffer
190func ReadRXTimestamp(oob []byte, boob int) (time.Time, error) {
191 return socketControlMessageTimestamp(oob, boob)
192}
193
194// ReadSocketDrops returns number of dropped packets from CMSG buffer
195func ReadSocketDrops(oob []byte, boob int) uint32 {
196 return socketControlMessageDrops(oob, boob)
197}
198
199// IPToSockaddr converts IP + port into a socket address
200// Somewhat copy from https://github.com/golang/go/blob/16cd770e0668a410a511680b2ac1412e554bd27b/src/net/ipsock_posix.go#L145

Callers 15

traceRouteMethod · 0.92
startEventListenerMethod · 0.92
startGeneralListenerMethod · 0.92
handleGeneralMessagesMethod · 0.92
TestHandleSighupFunction · 0.92
TestWorkerQueueFunction · 0.92
TestFindSubscriptionFunction · 0.92
TestFindClientsFunction · 0.92
TestInventoryClientsFunction · 0.92
TestSubscriptionStartFunction · 0.92
TestSubscriptionExpireFunction · 0.92
TestSubscriptionStopFunction · 0.92

Calls

no outgoing calls

Tested by 15

TestHandleSighupFunction · 0.74
TestWorkerQueueFunction · 0.74
TestFindSubscriptionFunction · 0.74
TestFindClientsFunction · 0.74
TestInventoryClientsFunction · 0.74
TestSubscriptionStartFunction · 0.74
TestSubscriptionExpireFunction · 0.74
TestSubscriptionStopFunction · 0.74
TestSubscriptionEndFunction · 0.74
TestSubscriptionflagsFunction · 0.74
TestSyncPacketFunction · 0.74
TestSyncDelayReqPacketFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…