NTP Analyzer  0.8.2
Analyze the operation of time servers
Ntp.Analyzer.Monitor.Cli.Program Class Reference

Static Public Member Functions

static void Main (string[] args)
 

Static Private Member Functions

static void ShowUsage ()
 

Detailed Description

Definition at line 28 of file Program.cs.

Member Function Documentation

static void Ntp.Analyzer.Monitor.Cli.Program.Main ( string[]  args)
inlinestatic

Definition at line 30 of file Program.cs.

31  {
32  if (args.Length >= 1 && args[0] == "help")
33  {
34  ShowUsage();
35  return;
36  }
37 
38  if (args.Length != 3)
39  {
40  ShowUsage();
41  return;
42  }
43 
44  IPAddress address;
45 
46  if (!IPAddress.TryParse(args[0], out address))
47  {
48  Console.WriteLine("IP address is not valid.");
49  ShowUsage();
50  return;
51  }
52 
53  int port;
54 
55  if (!int.TryParse(args[1], out port))
56  {
57  Console.WriteLine("Port number is not valid.");
58  ShowUsage();
59  return;
60  }
61 
62  string command = args[2];
63 
64  var req = new TextRequest(address, port);
65  string result = req.Send(command);
66 
67  Console.WriteLine(result);
68  }
static void Ntp.Analyzer.Monitor.Cli.Program.ShowUsage ( )
inlinestaticprivate

Definition at line 70 of file Program.cs.

71  {
72  Console.WriteLine("NTP Analyzer command query tool.");
73  Console.WriteLine("Usage: ntpac host port command");
74  }

The documentation for this class was generated from the following file: