List of usage examples for org.apache.commons.net.ntp NtpV3Packet NTP_PORT
int NTP_PORT
To view the source code for org.apache.commons.net.ntp NtpV3Packet NTP_PORT.
Click Source Link
From source file:examples.ntp.SimpleNTPServer.java
public static void main(String[] args) { int port = NtpV3Packet.NTP_PORT; if (args.length != 0) { try {// w ww. j av a 2 s . c o m port = Integer.parseInt(args[0]); } catch (NumberFormatException nfe) { nfe.printStackTrace(); } } SimpleNTPServer timeServer = new SimpleNTPServer(port); try { timeServer.start(); } catch (IOException e) { e.printStackTrace(); } }
From source file:examples.ntp.SimpleNTPServer.java
/** * Create SimpleNTPServer listening on default NTP port. */ public SimpleNTPServer() { this(NtpV3Packet.NTP_PORT); }