calvinfo / socket-ntp

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

Latency discrepancy when all clients run in same machine #11

Open HerculanoGripp opened 5 years ago

HerculanoGripp commented 5 years ago

Hi, I'm using socket-ntp to play videos synchronized in two or more machines. To do that, we schedule videos to start play at the same time based on latency between clients(ntp.latency()).

It works fine if clients run in different machines. Now I need to run all clients on the same machine, but it seems that latency is not the real one between the client and server. If I increase the number of clients in the same machine the latency worst.

I think the latency calculation is not to exactly when you have the server and other clients in the same machine. I tried to increase/decrease both parameters sync interval and clear interval but I had no success.

Does someone have any idea to solve this issue?