calvinfo / socket-ntp

NTP Sync using Socket.io
42 stars 6 forks source link

Setting the server url #4

Open kikz4life opened 10 years ago

kikz4life commented 10 years ago

Hi just want a question. What if I want to use this server url: pool.ntp.org to get the ntp time. Can this be done in your socket-ntp?

thanks,

calvinfo commented 10 years ago

hey, unfortunately no, not really :(

the main point of this library is to keep track of the clock offset between the client and server. it could be useful for things like gaming -- I was using it to sync audio between a bunch of different clients all connected to the same server.

as such, it doesn't use the official ntp protocol, just a stand-in to calculate the difference between client and server times.