networkConnections() fix pid issue (macOS)
This commit is contained in:
+24
-18
@@ -271,8 +271,8 @@
|
||||
<td colspan="7">
|
||||
<h5>Example</h5>
|
||||
<pre><code class="js">const si = require('systeminformation');
|
||||
si.networkInterfaces().then(data => console.log(data));</code></pre class="example">
|
||||
<pre class="example">
|
||||
si.networkInterfaces().then(data => console.log(data));</code></pre>
|
||||
<pre class="example">
|
||||
[
|
||||
{
|
||||
iface: 'lo0',
|
||||
@@ -317,6 +317,7 @@ si.networkInterfaces().then(data => console.log(data));</code></pre class="examp
|
||||
carrierChanges: 0
|
||||
}, ...
|
||||
]</pre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>si.networkInterfaceDefault(cb)</td>
|
||||
@@ -333,9 +334,10 @@ si.networkInterfaces().then(data => console.log(data));</code></pre class="examp
|
||||
<td colspan="7">
|
||||
<h5>Example</h5>
|
||||
<pre><code class="js">const si = require('systeminformation');
|
||||
si.networkInterfaceDefault().then(data => console.log(data));</code></pre class="example">
|
||||
<pre class="example">
|
||||
si.networkInterfaceDefault().then(data => console.log(data));</code></pre>
|
||||
<pre class="example">
|
||||
eth0</pre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>si.networkGatewayDefault(cb)</td>
|
||||
@@ -352,9 +354,10 @@ eth0</pre>
|
||||
<td colspan="7">
|
||||
<h5>Example</h5>
|
||||
<pre><code class="js">const si = require('systeminformation');
|
||||
si.networkGatewayDefault().then(data => console.log(data));</code></pre class="example">
|
||||
<pre class="example">
|
||||
si.networkGatewayDefault().then(data => console.log(data));</code></pre>
|
||||
<pre class="example">
|
||||
192.168.0.1</pre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>si.networkStats(iface,cb)</td>
|
||||
@@ -485,8 +488,8 @@ setInterval(function() {
|
||||
si.networkStats().then(data => {
|
||||
console.log(data);
|
||||
})
|
||||
}, 1000)</code></pre class="example">
|
||||
<pre class="example">
|
||||
}, 1000)</code></pre>
|
||||
<pre class="example">
|
||||
[
|
||||
{ // first call
|
||||
iface: 'en0',
|
||||
@@ -517,6 +520,7 @@ setInterval(function() {
|
||||
ms: 985
|
||||
}
|
||||
]...</pre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>si.networkConnections(cb)</td>
|
||||
@@ -613,8 +617,8 @@ setInterval(function() {
|
||||
<td colspan="7">
|
||||
<h5>Example</h5>
|
||||
<pre><code class="js">const si = require('systeminformation');
|
||||
si.networkConnections().then(data => console.log(data));</code></pre class="example">
|
||||
<pre class="example">
|
||||
si.networkConnections().then(data => console.log(data));</code></pre>
|
||||
<pre class="example">
|
||||
[
|
||||
{
|
||||
protocol: 'tcp4',
|
||||
@@ -638,6 +642,7 @@ si.networkConnections().then(data => console.log(data));</code></pre class="exam
|
||||
},
|
||||
...
|
||||
]</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -711,14 +716,15 @@ si.networkConnections().then(data => console.log(data));</code></pre class="exam
|
||||
<td colspan="7">
|
||||
<h5>Example</h5>
|
||||
<pre><code class="js">const si = require('systeminformation');
|
||||
si.inetChecksite('google.com').then(data => console.log(data));</code></pre class="example">
|
||||
<pre class="example">
|
||||
si.inetChecksite('google.com').then(data => console.log(data));</code></pre>
|
||||
<pre class="example">
|
||||
{
|
||||
url: 'google.com',
|
||||
ok: true,
|
||||
status: 301,
|
||||
ms: 82
|
||||
}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>si.inetLatency(host, cb)</td>
|
||||
@@ -735,14 +741,15 @@ si.inetChecksite('google.com').then(data => console.log(data));</code></pre clas
|
||||
<td colspan="7">
|
||||
<h5>Example</h5>
|
||||
<pre><code class="js">const si = require('systeminformation');
|
||||
si.inetLatency().then(data => console.log(data));</code></pre class="example">
|
||||
<pre class="example">
|
||||
si.inetLatency().then(data => console.log(data));</code></pre>
|
||||
<pre class="example">
|
||||
13.484</pre>
|
||||
<pre><code class="js">// Example with given host IP address
|
||||
const si = require('systeminformation');
|
||||
si.inetLatency('216.58.207.142').then(data => console.log(data));</code></pre class="example">
|
||||
<pre class="example">
|
||||
si.inetLatency('216.58.207.142').then(data => console.log(data));</code></pre>
|
||||
<pre class="example">
|
||||
11.291</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -770,8 +777,7 @@ setInterval(function() {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
<footer class="container-fluid footer">
|
||||
<div class="container">
|
||||
|
||||
Reference in New Issue
Block a user