Mercurial > hg > Papers > 2020 > koo-thesis
changeset 2:f176dbb8a43c
add code folder
author | e165727 <e165727@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 17 Jan 2020 00:49:28 +0900 |
parents | c69958482abf |
children | 32bba57ef41c |
files | Paper/.DS_Store Paper/code/abyss.p6 Paper/code/client.p6 Paper/code/eval.p6 |
diffstat | 4 files changed, 25 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Paper/code/abyss.p6 Fri Jan 17 00:49:28 2020 +0900 @@ -0,0 +1,17 @@ +unit class Abyss::Server:ver<0.0.1>; +use MONKEY-SEE-NO-EVAL; + +method readeval { + my $listen = IO::Socket::INET.new( + :listen, + :localhost<localhost>, + :localport(3333) + ); + loop { + my $conn = $listen.accept; + while my $buf = $conn.read(1024) { + EVALFILE $buf.decode; + } + $conn.close; + } +}