Example usage for Java org.apache.commons.net.ntp NTPUDPClient fields, constructors, methods, implement or subclass
The text is from its open source code.
void | close() Closes the DatagramSocket used for the connection. |
TimeInfo | getTime(InetAddress host) Retrieves the time information from the specified server on the default NTP port and returns it. |
TimeInfo | getTime(InetAddress host, int port) Retrieves the time information from the specified server and port and returns it. |
boolean | isOpen() Returns true if the client has a currently open socket. |
void | open() Opens a DatagramSocket on the local host at the first available port. |
void | open(int port, InetAddress laddr) Opens a DatagramSocket at the specified address on the local host at a specified port. |
void | setDefaultTimeout(int timeout) Set the default timeout in milliseconds to use when opening a socket. |
void | setVersion(int version) Sets the NTP protocol version number that client sets on request packet communicate with remote host. |