Skip to content

Commit 51d9ff5

Browse files
author
Jarkko Haapalainen
committed
IO::Socket::Async client example tweaks
Couple of tweaks: - There are issues with libuv when it defaults ipv6 when using localhost name. We can workaround that just using 127.0.0.1 instead of localhost name. - Added newline for print
1 parent 5a49f8b commit 51d9ff5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/Type/IO/Socket/Async.pod6

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ react {
4343
And a client that connects to it, and prints out what the server answers:
4444
4545
=begin code
46-
await IO::Socket::Async.connect('localhost', 3333).then( -> $promise {
46+
await IO::Socket::Async.connect('127.0.0.1', 3333).then( -> $promise {
4747
given $promise.result {
48-
.print('Hello, Perl 6');
48+
.print("Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n");
4949
react {
5050
whenever .Supply() -> $v {
51-
$v.say;
51+
$v.print;
5252
done;
5353
}
5454
}

0 commit comments

Comments
 (0)