Skip to content

Allow set custom port for NTP server #52

@babcca

Description

@babcca

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);).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions