-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathindex.html
116 lines (104 loc) · 5.83 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<!DOCTYPE html>
<html lang="en">
<head>
<title>NetUtils Reference</title>
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
<meta charset='utf-8'>
<script src="js/jquery.min.js" defer></script>
<script src="js/jazzy.js" defer></script>
<script src="js/lunr.min.js" defer></script>
<script src="js/typeahead.jquery.js" defer></script>
<script src="js/jazzy.search.js" defer></script>
</head>
<body>
<a title="NetUtils Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="index.html">NetUtils 4.2.1 Docs</a> (95% documented)</p>
<p class="header-right"><a href="https://github.com/svdo/swift-netutils"><img src="img/gh.png" alt="GitHub"/>View on GitHub</a></p>
<div class="header-right">
<form role="search" action="search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="index.html">NetUtils Reference</a>
<img id="carat" src="img/carat.png" alt=""/>
NetUtils Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Classes/Interface.html">Interface</a>
</li>
<li class="nav-group-task">
<a href="Classes/Interface/Family.html">– Family</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Extensions.html#/Interface">Interface</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1 id='netutils-for-swift' class='heading'>NetUtils for Swift</h1>
<p><img src="https://img.shields.io/badge/Swift-v3-yellow.svg" alt="Swift Version 3">
<img src="https://img.shields.io/badge/Swift-v4-yellow.svg" alt="Swift Version 4">
<a href="https://cocoapods.org/pods/NetUtils"><img src="https://img.shields.io/cocoapods/v/NetUtils.svg" alt="CocoaPods Version Badge"></a>
<a href="LICENSE.txt"><img src="https://img.shields.io/cocoapods/l/NetUtils.svg" alt="License Badge"></a>
<img src="https://img.shields.io/badge/platform-ios%20%7C%20macos%20%7C%20linux-lightgrey.svg" alt="Supported Platforms">
<a href="http://svdo.github.io/swift-netutils/"><img src="http://svdo.github.io/swift-netutils/badge.svg" alt="Percentage Documented Badge"></a>
<a href="https://github.com/Carthage/Carthage"><img src="https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat" alt="Carthage compatible"></a>
<a href="https://github.com/apple/swift-package-manager"><img src="https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg" alt="Swift Package Manager compatible"></a>
<a href="https://gitter.im/NetUtils-for-Swift/Lobby"><img src="https://badges.gitter.im/NetUtils-for-Swift/Lobby.svg" alt="Join the chat at https://gitter.im/NetUtils-for-Swift/Lobby"></a></p>
<p>Swift library that simplifies getting information about your network interfaces
and their properties, both for iOS, macOS and Linux. This library is a wrapper
around the BSD APIs like <code>getifaddrs</code>, to make it easy to use them from Swift.</p>
<p>Recommended way of integrating this library on macOS or iOS is using CocoaPods:
<a href="https://cocoapods.org/pods/NetUtils">https://cocoapods.org/pods/NetUtils</a>. On Linux I recommend using the Swift
Package Manager.</p>
<p>This library works with both Swift 5 and Swift 5.</p>
<h2 id='background-info' class='heading'>Background Info</h2>
<p>Some system APIs you can simply use from Swift, but others you cannot. The
difference is that some are made available as a module, and some are not. The
APIs around network interfaces are not exposed as a module, which means that you
cannot use them from Swift without defining a module for them yourself. I
documented this problem extensively <a href="https://medium.com/@stefanvdoord/using-system-headers-in-swift-8731e972adfe">in a blog post</a>.</p>
<h2 id='installation' class='heading'>Installation</h2>
<p>This library can be installed via CocoaPods, Carthage and Swift Package Manager.</p>
<h2 id='usage' class='heading'>Usage</h2>
<p>This module contains only one class: <code><a href="Classes/Interface.html">Interface</a></code>. This class represents a
network interface. It has a static method to list all interfaces, somewhat
surprisingly called <code>allInterfaces()</code>. This will return an array of <code><a href="Classes/Interface.html">Interface</a></code>
objects, which contain properties like their IP address, family, whether they
are up and running, etc.</p>
<p>Please note that both IPv4 and IPv6 interfaces are supported.</p>
<h2 id='license' class='heading'>License</h2>
<p>This project is released under the <a href="LICENSE.txt">MIT license</a>.</p>
</section>
</section>
<section id="footer">
<p>Copyright © 2015 <a class="link" href="https://github.com/svdo" target="_blank" rel="external noopener">Stefan van den Oord</a>. All rights reserved</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</html>