view other/client.p6 @ 3:d7762f4e8bfa

redirect answer to client ok
author e165727 <e165727@ie.u-ryukyu.ac.jp>
date Thu, 13 Feb 2020 20:49:23 +0900
parents f3eb367c309f
children 1ad45c44e12f
line wrap: on
line source

use IO::Socket::Unix;
use NativeCall;

my $conn = IO::Socket::Unix.new( :host<localhost>,
                                 :port(3333) );

$conn.print: '/Users/Koo/College/lab/Perl6/origin/Otoya-Server/other/fibonacci.p6';

my $sock_msg;

while my $buf = $conn.recv(:bin)
{
    $sock_msg = $buf.decode;
    last;
}

say $sock_msg;

#say $conn.recv;


#print $conn;
#$conn.close;