• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting accurate timestamps for received datagrams
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting accurate timestamps for received datagrams


  • Subject: Re: Getting accurate timestamps for received datagrams
  • From: Peter Sichel <email@hidden>
  • Date: Fri, 27 Mar 2009 09:40:09 -0400

On Mar 27, 2009, at 5:15 AM, Thomas Tempelmann wrote:

So my big question is: Which user-level UDP APIs are as immediate as possible when it comes to delivering incoming datagrams?

I think you want the kernel to time stamp your packets as they are received:


result = setsockopt(mSocket, SOL_SOCKET, SO_TIMESTAMP, &value, sizeof(int));

and then read the time stamp as ancillary data.

  result = recvmsg(mSocket, &msg, flags);

where "msg" includes both the data buffer and a control buffer containing the kernel time stamp. I do this to measure round trip times in IPNetMonitorX. I haven't tried this with CFSocket, but I imagine it just tells you there is data available on your socket and let's you do the rest if desired.

Kind Regards,

- Peter Sichel
  Sustainable Softworks

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Getting accurate timestamps for received datagrams (From: Thomas Tempelmann <email@hidden>)

  • Prev by Date: Re: Getting accurate timestamps for received datagrams
  • Next by Date: how to suppres network interface magic for USB devices
  • Previous by thread: Re: Getting accurate timestamps for received datagrams
  • Next by thread: how to suppres network interface magic for USB devices
  • Index(es):
    • Date
    • Thread