aboutsummaryrefslogtreecommitdiffstats
path: root/lib/osc.moon
diff options
context:
space:
mode:
Diffstat (limited to 'lib/osc.moon')
-rw-r--r--lib/osc.moon11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/osc.moon b/lib/osc.moon
index dae6737..fed1697 100644
--- a/lib/osc.moon
+++ b/lib/osc.moon
@@ -1,4 +1,4 @@
-import Const, Op, FnDef from require 'core'
+import Stream, Op from require 'core'
import pack, unpack from require 'osc'
import dns, udp from require 'socket'
@@ -13,12 +13,9 @@ class out extends Op
setup: (@host, @port, @path, @value) =>
update: (dt) =>
- for p in *{@host, @port, @path, @value}
- L\push p\update, dt
-
- ip = dns.toip @host\get!
- port = @port\get!
- msg = pack @path\get!, @value\get!
+ ip = dns.toip @host\unwrap 'str'
+ port = @port\unwrap 'num'
+ msg = pack (@path\unwrap 'str'), @value\unwrap!
@@udp\sendto msg, ip, port
{