You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/Type/IO/Socket/Async.pod
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ C<IO::Socket::Async> provides asynchronous TCP sockets, for both the
10
10
server and the client side.
11
11
12
12
Here is the equivalent example to that in
13
-
L<IO::Socket::INET|/lib/Type/IO/Socket/INET> of a simple echo server
13
+
L<IO::Socket::INET> of a simple echo server
14
14
that listens on port 3333:
15
15
16
16
=begincode
@@ -57,17 +57,17 @@ or C<listen> should be used to create a client or a server respectively.
57
57
method connect(Str $host, Int $port) returns Promise
58
58
59
59
Attempts to connect to the TCP server specified by C<$host> and C<$port>,
60
-
returning a L<Promise|/lib/Type/Promise> that will either be kept with a connected L<IO::Socket::Async> or broken if the connection cannot be made.
60
+
returning a L<Promise> that will either be kept with a connected L<IO::Socket::Async> or broken if the connection cannot be made.
61
61
62
62
=head2method listen
63
63
64
64
method listen(Str $host, Int $port) returns Supply
65
65
66
66
Creates a listening socket on the specified C<$host> and C<$port>, returning
67
-
a L<Supply|/lib/Type/Supply> to which the accepted client L<IO::Socket::Async>s will be C<emit>ted. This L<Supply|/lib/Type/Supply> should be tapped to
67
+
a L<Supply> to which the accepted client L<IO::Socket::Async>s will be C<emit>ted. This L<Supply> should be tapped to
68
68
process the client connections.
69
69
70
-
To close the underlying listening socket the L<Supply|/lib/Type/Supply>
70
+
To close the underlying listening socket the L<Supply>
71
71
should be C<close>d.
72
72
73
73
=head2method print
@@ -76,7 +76,7 @@ should be C<close>d.
76
76
77
77
Attempt to send C<$str> on the L<IO::Socket::Async> that will
78
78
have been obtained indirectly via C<connect> or C<listen>, returning a
79
-
L<Promise|/lib/Type/Promise> that will be kept with the number of bytes
79
+
L<Promise> that will be kept with the number of bytes
80
80
sent or broken if there was an error sending.
81
81
82
82
=head2method write
@@ -85,33 +85,33 @@ sent or broken if there was an error sending.
85
85
86
86
Attempt to send the bytes in C<$b> on the L<IO::Socket::Async> that will
87
87
have been obtained indirectly via C<connect> or C<listen>, returning a
88
-
L<Promise|/lib/Type/Promise> that will be kept with the number of bytes
88
+
L<Promise> that will be kept with the number of bytes
89
89
sent or broken if there was an error sending.
90
90
91
91
=head2method chars-supply
92
92
93
93
method chars-supply() returns Supply
94
94
95
-
Returns a L<Supply|/lib/Type/Supply> which can be tapped to obtain the
95
+
Returns a L<Supply> which can be tapped to obtain the
96
96
characters read from the connected L<IO::Socket::Async> as they arrive.
97
97
98
98
=head2method bytes-supply
99
99
100
100
method bytes-supply() returns Supply
101
101
102
-
Returns a L<Supply|/lib/Type/Supply> which can be tapped to obtain
103
-
the bytes (as elements of a L<Buf|/lib/Type/Buf>,) read from the
102
+
Returns a L<Supply> which can be tapped to obtain
103
+
the bytes (as elements of a L<Buf>,) read from the
104
104
L<IO::Socket::Async> as they arrive.
105
105
106
106
=head2method close
107
107
108
108
method close()
109
109
110
110
Close the connected client <IO::Socket::Async> which will have been
111
-
obtained from the C<listen>L<Supply|/lib/Type/Supply> or the C<connect>
112
-
L<Promise|/lib/Type/Promise>.
111
+
obtained from the C<listen>L<Supply> or the C<connect>
112
+
L<Promise>.
113
113
114
114
In order to close the underlying listening socket created by C<listen> you
115
-
can simply C<close> the L<Supply|/lib/Type/Supply>.
0 commit comments