develooper Front page | perl.perl6.language | Postings from March 2009

r26031 - docs/Perl6/Spec/S32-setting-library

From:
pugs-commits
Date:
March 30, 2009 17:49
Subject:
r26031 - docs/Perl6/Spec/S32-setting-library
Message ID:
20090331004855.24544.qmail@feather.perl6.nl
Author: wayland
Date: 2009-03-31 02:48:54 +0200 (Tue, 31 Mar 2009)
New Revision: 26031

Modified:
   docs/Perl6/Spec/S32-setting-library/IO.pod
Log:
S32/IO: Expanded IO::Socket, mostly at the expense of IO::Socket::INET.  


Modified: docs/Perl6/Spec/S32-setting-library/IO.pod
===================================================================
--- docs/Perl6/Spec/S32-setting-library/IO.pod	2009-03-31 00:30:46 UTC (rev 26030)
+++ docs/Perl6/Spec/S32-setting-library/IO.pod	2009-03-31 00:48:54 UTC (rev 26031)
@@ -451,7 +451,12 @@
 
 =head2 IO::Socket
 
-    role IO::Socket does IO::Closeable {
+    role IO::Socket 
+        does IO::Closeable 
+        does IO::Readable 
+        does IO::Writeable 
+        does IO::Streamable 
+    {
         has %.options;
         has Bool $.Listening = 0;
         ...
@@ -459,6 +464,11 @@
 
 Accessing the C<%.options> would on Unix be done with I<getsockopt(2)>/I<setsockopt(2)>.
 
+The $.Listening attribute indicates whether the socket will be a listening socket when 
+opened, rather than indicating whether it is currently listening.
+
+[TODO: come up with a better name for it -- $.Server maybe?]
+
 =over
 
 =item new
@@ -479,7 +489,7 @@
 
     method close()
 
-Reimplements the close() function from IO::Closeable by doing a shutdown on the connection 
+Implements the close() function from IO::Closeable by doing a shutdown on the connection 
 (see below) with @how set to ('Readable', 'Writeable').   
 
 =item shutdown
@@ -495,6 +505,16 @@
 
     method accept( --> IO::Socket)
 
+=item method read($buf is rw, Int $bytes --> Int)
+
+Implementes the IO::Readable interface by doing a I<recv(2)>.  
+
+=item method write($buf, Int $bytes --> Int)
+
+Implementes the IO::Writeable interface by doing  a I<send(2)>.
+
+=item getpeername
+
 =back
 
 =head2 IO::FileDescriptor
@@ -883,7 +903,7 @@
 
 =head2 IO::Socket::INET
 
-    class IO::Socket::INET does IO::Socket does IO::Streamable {
+    class IO::Socket::INET does IO::Socket {
         has Str $.Protocol = 'TCP';
         ...
     }
@@ -914,18 +934,6 @@
 
 IPv6 is supported.  
 
-=item method read($buf is rw, Int $bytes --> Int)
-
-Does a I<recv(2)>.  
-
-=item method write($buf, Int $bytes --> Int)
-
-Does a I<send(2)>.
-
-=item IO.getpeername
-
-=item /[get|set][host|net|proto|serv|sock].*/
-
 =back
 
 =head2 IO::Pipe
@@ -1123,6 +1131,10 @@
 
 See C<IO::FileDescriptor>.
 
+=item /(get|set)(host|net|proto|serv|sock).*/
+
+Should be implemented by an external library.  
+
 =item lstat
 
 Use C<stat> with the C<:link> option.  




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About