Skip to content

Commit cf855ee

Browse files
committed
[S32::IO] bring INET stuff closer to reality
1 parent f265507 commit cf855ee

File tree

1 file changed

+8
-20
lines changed

1 file changed

+8
-20
lines changed

S32-setting-library/IO.pod

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,34 +1094,22 @@ Windows system, this can be a parent directory, as permissions are inherited.
10941094
=head2 IO::Socket::INET
10951095

10961096
class IO::Socket::INET does IO::Socket {
1097-
has Int $.Version = 4; # Whether to use IPv4 or IPv6
1098-
has Str $.Protocol = 'TCP';
1099-
has Str $.RemoteHost;
1100-
has Int $.RemotePort;
1101-
has Str $.LocalHost;
1102-
has Int $.LocalPort;
1097+
has Str $.proto = 'TCP';
1098+
has Str $.host;
1099+
has Int $.port;
1100+
has Str $.localhost;
1101+
has Int $.localport;
11031102
...
11041103
}
11051104

11061105
=over
11071106

11081107
=item new
11091108

1110-
method new(
1111-
Str :$RemoteHost, # Initialises $.RemoteHost
1112-
Str :$RemotePort, # Initialises $.RemotePort (if it's not a numeric string, use getservbyname)
1113-
Str :$LocalHost, # Initialises $.LocalHost
1114-
Str :$LocalPort, # Initialises $.LocalPort (if it's not a numeric string, use getservbyname)
1115-
Str :$Protocol, # Initialises $.Protocol
1116-
Int :$Version, # Initialises $.Version (IPv4 vs. IPv6)
1117-
1118-
Bool :$Listener, # Passed to IO::Socket.new()
1109+
multi method new(:$host!, :$port, *%attributes) { ... }
1110+
multi method new(:$localhost!, :$localport, :$listen! *%attributes) { ... }
11191111

1120-
Bool :$Blocking, # Passed to IO::Streamable.new()
1121-
Bool :$NoOpen, # Passed to IO::Streamable.new()
1122-
1123-
--> IO::Socket::INET
1124-
) {...}
1112+
Creates a new socket and opens it.
11251113

11261114
=back
11271115

0 commit comments

Comments
 (0)