diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-03-03 16:32:49 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2020-03-05 10:36:33 +0000 |
| commit | 12dc8c05854054e1bb05709afdcdeec5e8b05333 (patch) | |
| tree | cd07c81075fb311d8f6a1dfd04c66777c9187e51 /lib | |
| parent | add index and guide pages (diff) | |
| download | alive-12dc8c05854054e1bb05709afdcdeec5e8b05333.tar.gz alive-12dc8c05854054e1bb05709afdcdeec5e8b05333.zip | |
add Dockerfile for CI
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/pilot.moon | 4 |
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 |
