Changeset 887 for trunk/Modules/NetworkConfigLinux/Generators
- Timestamp:
- Nov 20, 2020, 12:08:12 AM (4 years ago)
- Location:
- trunk/Modules/NetworkConfigLinux/Generators
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/NetworkConfigLinux/Generators/CheckPorts.php
r874 r887 3 3 class ConfigCheckPorts extends NetworkConfigItem 4 4 { 5 function CheckPortStatus($IP, $Port, $Protocol = 'tcp') 5 function CheckPortStatus($IP, $Port, $Protocol = 'tcp'): int 6 6 { 7 7 $Timeout = 1; … … 17 17 return $State; 18 18 } 19 20 function CheckPorts() 19 20 function CheckPorts(): void 21 21 { 22 22 $StartTime = time(); … … 77 77 } 78 78 79 function Run() 79 function Run(): void 80 80 { 81 81 RepeatFunction(60, array($this, 'CheckPorts')); -
trunk/Modules/NetworkConfigLinux/Generators/DNS.php
r873 r887 7 7 class ConfigDNS extends NetworkConfigItem 8 8 { 9 function GenerateDNS( $DNS)9 function GenerateDNS(array $DNS): void 10 10 { 11 11 $Output = '$ORIGIN '.$DNS['Domain'].'.'."\n". … … 147 147 } 148 148 149 function Run() 149 function Run(): void 150 150 { 151 151 $BaseDomain = 'zdechov.net'; -
trunk/Modules/NetworkConfigLinux/Generators/Latency.php
r873 r887 3 3 class ConfigLatency extends NetworkConfigItem 4 4 { 5 function PingHosts() 5 function PingHosts(): void 6 6 { 7 7 $Timeout = 2000; // ms … … 23 23 24 24 $Queries = array(); 25 foreach ($Output as $Index => $Line) 25 foreach ($Output as $Index => $Line) 26 26 { 27 27 $IP = substr($Line, 0, strPos($Line, ' ')); … … 35 35 } 36 36 37 function Run() 37 function Run(): void 38 38 { 39 39 RepeatFunction(10 * 60, array($this, 'PingHosts'));
Note:
See TracChangeset
for help on using the changeset viewer.