Mercurial Hosting > luan
diff src/luan/modules/Io.luan @ 1280:781ec0a92bb5
add Boot.luan
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 20 Dec 2018 13:38:16 -0700 |
parents | 5ba660381bd5 |
children | 8432d20a2729 |
line wrap: on
line diff
--- a/src/luan/modules/Io.luan Tue Dec 18 12:54:55 2018 -0700 +++ b/src/luan/modules/Io.luan Thu Dec 20 13:38:16 2018 -0700 @@ -1,18 +1,19 @@ java() local IoLuan = require "java:luan.modules.IoLuan" local System = require "java:java.lang.System" +local Boot = require "luan:Boot.luan" + local Io = {} Io.ip = IoLuan.ip Io.my_ips = IoLuan.my_ips Io.read_console_line = IoLuan.read_console_line -Io.schemes = IoLuan.newSchemes() -Io.uri = IoLuan.uri -Io.stdin = IoLuan.defaultStdin.table() ---Io.socket_server = IoLuan.socket_server -Io.stdout = IoLuan.textWriter(System.out) -Io.stderr = IoLuan.textWriter(System.err) +Io.schemes = Boot.schemes +Io.uri = Boot.uri +Io.stdin = Boot.new_LuanIn( IoLuan.defaultStdin ) +Io.stdout = Boot.text_writer(System.out) +Io.stderr = Boot.text_writer(System.err) Io.unrestricted = IoLuan.unrestricted -- used by http and rpc