[前][次][番号順一覧][スレッド一覧]

ruby-changes:15131

From: akr <ko1@a...>
Date: Mon, 22 Mar 2010 10:24:39 +0900 (JST)
Subject: [ruby-changes:15131] Ruby:r27008 (trunk): update doc.

akr	2010-03-22 10:24:28 +0900 (Mon, 22 Mar 2010)

  New Revision: 27008

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27008

  Log:
    update doc.

  Modified files:
    trunk/ext/socket/lib/socket.rb

Index: ext/socket/lib/socket.rb
===================================================================
--- ext/socket/lib/socket.rb	(revision 27007)
+++ ext/socket/lib/socket.rb	(revision 27008)
@@ -58,14 +58,14 @@
   # The socket is returned otherwise.
   #
   #   Addrinfo.tcp("www.ruby-lang.org", 80).connect_from("0.0.0.0", 4649) {|s|
-  #     s.print "GET / HTTP/1.0\r\n\r\n"
-  #     p s.read
+  #     s.print "GET / HTTP/1.0\r\nHost: www.ruby-lang.org\r\n\r\n"
+  #     puts s.read
   #   }
   #
   #   # Addrinfo object can be taken for the argument.
   #   Addrinfo.tcp("www.ruby-lang.org", 80).connect_from(Addrinfo.tcp("0.0.0.0", 4649)) {|s|
-  #     s.print "GET / HTTP/1.0\r\n\r\n"
-  #     p s.read
+  #     s.print "GET / HTTP/1.0\r\nHost: www.ruby-lang.org\r\n\r\n"
+  #     puts s.read
   #   }
   #
   def connect_from(*local_addr_args, &block)
@@ -78,8 +78,8 @@
   # The socket is returned otherwise.
   #
   #   Addrinfo.tcp("www.ruby-lang.org", 80).connect {|s|
-  #     s.print "GET / HTTP/1.0\r\n\r\n"
-  #     p s.read
+  #     s.print "GET / HTTP/1.0\r\nHost: www.ruby-lang.org\r\n\r\n"
+  #     puts s.read
   #   }
   #
   def connect(&block)
@@ -92,8 +92,8 @@
   # The socket is returned otherwise.
   #
   #   Addrinfo.tcp("0.0.0.0", 4649).connect_to("www.ruby-lang.org", 80) {|s|
-  #     s.print "GET / HTTP/1.0\r\n\r\n"
-  #     p s.read
+  #     s.print "GET / HTTP/1.0\r\nHost: www.ruby-lang.org\r\n\r\n"
+  #     puts s.read
   #   }
   #
   def connect_to(*remote_addr_args, &block)
@@ -220,9 +220,9 @@
   # If no block is given, the socket is returned.
   #
   #   Socket.tcp("www.ruby-lang.org", 80) {|sock|
-  #     sock.print "GET / HTTP/1.0\r\n\r\n"
+  #     sock.print "GET / HTTP/1.0\r\nHost: www.ruby-lang.org\r\n\r\n"
   #     sock.close_write
-  #     print sock.read
+  #     puts sock.read
   #   }
   #
   def self.tcp(host, port, local_host=nil, local_port=nil) # :yield: socket

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]