Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow set custom port for NTP server #52

Open
babcca opened this issue Dec 22, 2020 · 0 comments
Open

Allow set custom port for NTP server #52

babcca opened this issue Dec 22, 2020 · 0 comments

Comments

@babcca
Copy link

babcca commented Dec 22, 2020

Hi,
your SntpClient.java has hardcoded NTP port.
https://github.com/lyft/Kronos-Android/blob/master/kronos-java/src/main/java/com/lyft/kronos/internal/ntp/SntpClient.java#L91

Sometimes is useful host custom NTP server on different then well known (blocked) port.

What about parse port for NTP server from host using : as separator and NTP_PORT as fallback?
Define host like host := "hostname[:port]" where hostname is string containing DNS or IP address of target NTP server and optional port for target listening port number.

Right before dns resolve(InetAddress address = dnsResolver.resolve(host);).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant