Moved socket constructors to prelude.
h3rald h3rald@h3rald.com
Sat, 18 Jun 2016 19:20:23 +0200
2 files changed,
6 insertions(+),
12 deletions(-)
M
lib/min_net.nim
→
lib/min_net.nim
@@ -51,18 +51,6 @@ q.scope.symbols["domain"] = proc (i:In) =
i.push vals[0].symVal.newVal i.push @[q] - .symbol("tcp-socket") do (i: In): - i.eval("(ipv4 stream tcp) net %open-socket") - - .symbol("udp-socket") do (i: In): - i.eval("(ipv4 dgram udp) net %open-socket") - - .symbol("tcp6-socket") do (i: In): - i.eval("(ipv6 stream tcp) net %open-socket") - - .symbol("udp6-socket") do (i: In): - i.eval("(ipv6 dgram udp) net %open-socket") - .symbol("close-socket") do (i: In): var q: MinValue i.reqObject "socket", q
M
lib/prelude.min
→
lib/prelude.min
@@ -78,3 +78,9 @@ (print pop) :print!
(put pop) :put! (:ms :q :check (check) (ms sleep q) while) :interval +; Socket constructors +((ipv4 stream tcp) socket) :tcp-socket +((ipv6 stream tcp) socket) :tcp6-socket +((ipv4 dgram tcp) socket) :udp-socket +((ipv6 dgram tcp) socket) :udp6-socket +