ruby-changes:14670
From: akr <ko1@a...>
Date: Sun, 31 Jan 2010 18:03:19 +0900 (JST)
Subject: [ruby-changes:14670] Ruby:r26521 (trunk): update rdoc.
akr 2010-01-31 18:03:08 +0900 (Sun, 31 Jan 2010) New Revision: 26521 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26521 Log: update rdoc. Modified files: trunk/ext/socket/socket.c Index: ext/socket/socket.c =================================================================== --- ext/socket/socket.c (revision 26520) +++ ext/socket/socket.c (revision 26521) @@ -502,12 +502,12 @@ /* * call-seq: - * socket.recvfrom(maxlen) => [mesg, sender_sockaddr] - * socket.recvfrom(maxlen, flags) => [mesg, sender_sockaddr] + * socket.recvfrom(maxlen) => [mesg, sender_addrinfo] + * socket.recvfrom(maxlen, flags) => [mesg, sender_addrinfo] * * Receives up to _maxlen_ bytes from +socket+. _flags_ is zero or more * of the +MSG_+ options. The first element of the results, _mesg_, is the data - * received. The second element, _sender_sockaddr_, contains protocol-specific information + * received. The second element, _sender_addrinfo_, contains protocol-specific information * on the sender. * * === Parameters @@ -522,7 +522,7 @@ * sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' ) * socket.bind( sockaddr ) * socket.listen( 5 ) - * client, client_sockaddr = socket.accept + * client, client_addrinfo = socket.accept * data = client.recvfrom( 20 )[0].chomp * puts "I only received 20 bytes '#{data}'" * sleep 1 @@ -613,14 +613,14 @@ /* * call-seq: - * socket.recvfrom_nonblock(maxlen) => [mesg, sender_sockaddr] - * socket.recvfrom_nonblock(maxlen, flags) => [mesg, sender_sockaddr] + * socket.recvfrom_nonblock(maxlen) => [mesg, sender_addrinfo] + * socket.recvfrom_nonblock(maxlen, flags) => [mesg, sender_addrinfo] * * Receives up to _maxlen_ bytes from +socket+ using recvfrom(2) after * O_NONBLOCK is set for the underlying file descriptor. * _flags_ is zero or more of the +MSG_+ options. * The first element of the results, _mesg_, is the data received. - * The second element, _sender_sockaddr_, contains protocol-specific information + * The second element, _sender_addrinfo_, contains protocol-specific information * on the sender. * * When recvfrom(2) returns 0, Socket#recvfrom_nonblock returns @@ -639,7 +639,7 @@ * sockaddr = Socket.sockaddr_in(2200, 'localhost') * socket.bind(sockaddr) * socket.listen(5) - * client, client_sockaddr = socket.accept + * client, client_addrinfo = socket.accept * begin # emulate blocking recvfrom * pair = client.recvfrom_nonblock(20) * rescue IO::WaitReadable @@ -709,14 +709,13 @@ /* * call-seq: - * socket.accept_nonblock => [client_socket, client_sockaddr] + * socket.accept_nonblock => [client_socket, client_addrinfo] * * Accepts an incoming connection using accept(2) after * O_NONBLOCK is set for the underlying file descriptor. * It returns an array containing the accepted socket * for the incoming connection, _client_socket_, - * and a string that contains the +struct+ sockaddr information - * about the caller, _client_sockaddr_. + * and an Addrinfo, _client_addrinfo_. * * === Example * # In one script, start this first @@ -727,7 +726,7 @@ * socket.bind(sockaddr) * socket.listen(5) * begin # emulate blocking accept - * client_socket, client_sockaddr = socket.accept_nonblock + * client_socket, client_addrinfo = socket.accept_nonblock * rescue IO::WaitReadable, Errno::EINTR * IO.select([socket]) * retry @@ -774,12 +773,11 @@ /* * call-seq: - * socket.sysaccept => [client_socket_fd, client_sockaddr] + * socket.sysaccept => [client_socket_fd, client_addrinfo] * * Accepts an incoming connection returning an array containing the (integer) * file descriptor for the incoming connection, _client_socket_fd_, - * and a string that contains the +struct+ sockaddr information - * about the caller, _client_sockaddr_. + * and an Addrinfo, _client_addrinfo_. * * === Example * # In one script, start this first @@ -789,7 +787,7 @@ * sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' ) * socket.bind( sockaddr ) * socket.listen( 5 ) - * client_fd, client_sockaddr = socket.sysaccept + * client_fd, client_addrinfo = socket.sysaccept * client_socket = Socket.for_fd( client_fd ) * puts "The client said, '#{client_socket.readline.chomp}'" * client_socket.puts "Hello from script one!" -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/