mirror of https://github.com/deavmi/libtun.git
23 lines
368 B
D
23 lines
368 B
D
|
module libtun.testing.app;
|
||
|
|
||
|
import std.stdio;
|
||
|
|
||
|
import libtun.adapter;
|
||
|
import core.thread;
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
writeln("Edit source/app.d to start your project.");
|
||
|
TUNAdapter adapter = new TUNAdapter("testInterface0");
|
||
|
|
||
|
while(true)
|
||
|
{
|
||
|
adapter.send([1,1,2,2,2,2]);
|
||
|
byte[] buffer;
|
||
|
adapter.receive(buffer);
|
||
|
writeln(buffer);
|
||
|
Thread.sleep(dur!("msecs")(50));
|
||
|
}
|
||
|
|
||
|
}
|