mirror of https://github.com/deavmi/libtun.git
Renamed `TUNAdapter` -> `Adapter`
This commit is contained in:
parent
a234f52908
commit
76991d7082
|
@ -13,9 +13,9 @@ First add it to your dub-based project via:
|
||||||
dub add libtun
|
dub add libtun
|
||||||
```
|
```
|
||||||
|
|
||||||
### `TUNAdapter`
|
### `Adapter`
|
||||||
|
|
||||||
The `TUNAdapter` class provides you with all you need to get started. One can construct a new adapter as follows:
|
The `Adapter` class provides you with all you need to get started. One can construct a new adapter as follows:
|
||||||
|
|
||||||
```d
|
```d
|
||||||
import libtun.adapter;
|
import libtun.adapter;
|
||||||
|
|
|
@ -16,7 +16,7 @@ import libtun.tunctl;
|
||||||
// extern (C) int tunWrite(int fd, char* data, int length);
|
// extern (C) int tunWrite(int fd, char* data, int length);
|
||||||
// extern (C) int tunRead(int fd, char* data, int amount);
|
// extern (C) int tunRead(int fd, char* data, int amount);
|
||||||
|
|
||||||
public class TUNAdapter
|
public class Adapter
|
||||||
{
|
{
|
||||||
/* Tunnel device descriptor */
|
/* Tunnel device descriptor */
|
||||||
private int tunFD;
|
private int tunFD;
|
||||||
|
|
|
@ -8,7 +8,7 @@ import core.thread;
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
writeln("Edit source/app.d to start your project.");
|
writeln("Edit source/app.d to start your project.");
|
||||||
TUNAdapter adapter = new TUNAdapter("testInterface0");
|
Adapter adapter = new Adapter("testInterface0");
|
||||||
|
|
||||||
while(true)
|
while(true)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue