Skip to content

Commit

Permalink
show client example
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanorelli committed Dec 4, 2018
1 parent c4aa7bf commit 595378c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions ex/ex.ck
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
"127.0.0.1" => string tunnelHost;
9001 => int tunnelPort;

"127.0.0.1" => string destHost;
9002 => int destPort;

"tuntun" => string cmd;
" --listen " + tunnelHost + ":" + Std.itoa(tunnelPort) +=> cmd;
" --forward " + destHost + ":" + Std.itoa(destPort) +=> cmd;
<<< Std.system(cmd + " &") >>>;

fun void gen() {
OscSend xmit;
xmit.setHost(tunnelHost, tunnelPort);

while (true) {
xmit.startMsg("/example", "i");
Math.random2(0,127) => xmit.addInt;
100::ms => now;
}
}

0 comments on commit 595378c

Please sign in to comment.