view Paper/code/client.p6 @ 25:cde9c8f9b7e4 default tip

update slide
author e165727 <e165727@ie.u-ryukyu.ac.jp>
date Mon, 17 Feb 2020 04:11:41 +0900
parents b96b3244307b
children
line wrap: on
line source

use IO::Socket::Unix;

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

$conn.print: 'Absolute file path';

my $sock_msg;

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

say $sock_msg;