Java org.apache.commons.net.ntp NTPUDPClient fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.net.ntp NTPUDPClient fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.net.ntp NTPUDPClient.

The text is from its open source code.

Constructor

Method

voidclose()
Closes the DatagramSocket used for the connection.
TimeInfogetTime(InetAddress host)
Retrieves the time information from the specified server on the default NTP port and returns it.
TimeInfogetTime(InetAddress host, int port)
Retrieves the time information from the specified server and port and returns it.
booleanisOpen()
Returns true if the client has a currently open socket.
voidopen()
Opens a DatagramSocket on the local host at the first available port.
voidopen(int port, InetAddress laddr)
Opens a DatagramSocket at the specified address on the local host at a specified port.
voidsetDefaultTimeout(int timeout)
Set the default timeout in milliseconds to use when opening a socket.
voidsetVersion(int version)
Sets the NTP protocol version number that client sets on request packet communicate with remote host.