aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2020-03-03 16:32:49 +0000
committers-ol <s-ol@users.noreply.github.com>2020-03-05 10:36:33 +0000
commit12dc8c05854054e1bb05709afdcdeec5e8b05333 (patch)
treecd07c81075fb311d8f6a1dfd04c66777c9187e51 /lib
parentadd index and guide pages (diff)
downloadalive-12dc8c05854054e1bb05709afdcdeec5e8b05333.tar.gz
alive-12dc8c05854054e1bb05709afdcdeec5e8b05333.zip
add Dockerfile for CI
Diffstat (limited to 'lib')
-rw-r--r--lib/pilot.moon4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pilot.moon b/lib/pilot.moon
index 7251f55..5c680ed 100644
--- a/lib/pilot.moon
+++ b/lib/pilot.moon
@@ -1,7 +1,8 @@
import Op, EventInput, ValueInput, ColdInput, match from require 'core.base'
import udp from require 'socket'
-conn = udp!
+local conn
+
hex = "0123456789abcdef"
encode = (arg) ->
switch type arg
@@ -16,6 +17,7 @@ send = (...) ->
for i = 1, select '#', ...
tbl = select i, ...
str ..= table.concat [encode v for v in *tbl]
+ conn or= udp!
conn\sendto str, '127.0.0.1', 49161
class play extends Op