From 77ca81e465d809c9c7427c53b09c8951c508ad3d Mon Sep 17 00:00:00 2001 From: zzak Date: Mon, 19 Aug 2013 16:54:59 +0000 Subject: * ext/socket/unixserver.c: [DOC] Document #accept * ext/socket/tcpserver.c: ditto * ext/socket/udpsocket.c: [DOC] Fix indentation of documentation * ext/socket/socket.c: ditto Patches by David Rodríguez [ruby-core:56734] [Bug #8802] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++++ ext/socket/socket.c | 20 ++++++++++---------- ext/socket/tcpserver.c | 6 ++++-- ext/socket/udpsocket.c | 4 ++-- ext/socket/unixserver.c | 6 +++--- 5 files changed, 27 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6e5ca885cc..96367eae8c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Tue Aug 20 01:52:05 2013 Zachary Scott + + * ext/socket/unixserver.c: [DOC] Document #accept + * ext/socket/tcpserver.c: ditto + * ext/socket/udpsocket.c: [DOC] Fix indentation of documentation + * ext/socket/socket.c: ditto + Patches by David Rodríguez [ruby-core:56734] [Bug #8802] + Tue Aug 20 01:19:22 2013 Tanaka Akira * configure.in: Define ac_cv_func_clock_gettime to yes for mingw*. diff --git a/ext/socket/socket.c b/ext/socket/socket.c index cbde0ede96..5fd74652c6 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -262,7 +262,7 @@ rsock_sock_s_socketpair(int argc, VALUE *argv, VALUE klass) /* * call-seq: - * socket.connect(remote_sockaddr) => 0 + * socket.connect(remote_sockaddr) => 0 * * Requests a connection to be made on the given +remote_sockaddr+. Returns 0 if * successful, otherwise an exception is raised. @@ -392,7 +392,7 @@ sock_connect(VALUE sock, VALUE addr) /* * call-seq: - * socket.connect_nonblock(remote_sockaddr) => 0 + * socket.connect_nonblock(remote_sockaddr) => 0 * * Requests a connection to be made on the given +remote_sockaddr+ after * O_NONBLOCK is set for the underlying file descriptor. @@ -455,7 +455,7 @@ sock_connect_nonblock(VALUE sock, VALUE addr) /* * call-seq: - * socket.bind(local_sockaddr) => 0 + * socket.bind(local_sockaddr) => 0 * * Binds to the given local address. * @@ -555,7 +555,7 @@ sock_bind(VALUE sock, VALUE addr) /* * call-seq: - * socket.listen( int ) => 0 + * socket.listen( int ) => 0 * * Listens for connections, using the specified +int+ as the backlog. A call * to _listen_ only applies if the +socket+ is of type SOCK_STREAM or @@ -639,8 +639,8 @@ rsock_sock_listen(VALUE sock, VALUE log) /* * call-seq: - * socket.recvfrom(maxlen) => [mesg, sender_addrinfo] - * socket.recvfrom(maxlen, flags) => [mesg, sender_addrinfo] + * 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 @@ -750,8 +750,8 @@ sock_recvfrom(int argc, VALUE *argv, VALUE sock) /* * call-seq: - * socket.recvfrom_nonblock(maxlen) => [mesg, sender_addrinfo] - * socket.recvfrom_nonblock(maxlen, flags) => [mesg, sender_addrinfo] + * 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. @@ -846,7 +846,7 @@ sock_accept(VALUE sock) /* * call-seq: - * socket.accept_nonblock => [client_socket, client_addrinfo] + * socket.accept_nonblock => [client_socket, client_addrinfo] * * Accepts an incoming connection using accept(2) after * O_NONBLOCK is set for the underlying file descriptor. @@ -910,7 +910,7 @@ sock_accept_nonblock(VALUE sock) /* * call-seq: - * socket.sysaccept => [client_socket_fd, client_addrinfo] + * 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_, diff --git a/ext/socket/tcpserver.c b/ext/socket/tcpserver.c index 2ca2a188a6..2245a0600d 100644 --- a/ext/socket/tcpserver.c +++ b/ext/socket/tcpserver.c @@ -12,7 +12,7 @@ /* * call-seq: - * TCPServer.new([hostname,] port) => tcpserver + * TCPServer.new([hostname,] port) => tcpserver * * Creates a new server socket bound to _port_. * @@ -43,6 +43,8 @@ tcp_svr_init(int argc, VALUE *argv, VALUE sock) * call-seq: * tcpserver.accept => tcpsocket * + * Accepts an incoming connection. It returns a new TCPSocket object. + * * TCPServer.open("127.0.0.1", 14641) {|serv| * s = serv.accept * s.puts Time.now @@ -64,7 +66,7 @@ tcp_accept(VALUE sock) /* * call-seq: - * tcpserver.accept_nonblock => tcpsocket + * tcpserver.accept_nonblock => tcpsocket * * Accepts an incoming connection using accept(2) after * O_NONBLOCK is set for the underlying file descriptor. diff --git a/ext/socket/udpsocket.c b/ext/socket/udpsocket.c index de334fcbe4..a89c453239 100644 --- a/ext/socket/udpsocket.c +++ b/ext/socket/udpsocket.c @@ -194,8 +194,8 @@ udp_send(int argc, VALUE *argv, VALUE sock) /* * call-seq: - * udpsocket.recvfrom_nonblock(maxlen) => [mesg, sender_inet_addr] - * udpsocket.recvfrom_nonblock(maxlen, flags) => [mesg, sender_inet_addr] + * udpsocket.recvfrom_nonblock(maxlen) => [mesg, sender_inet_addr] + * udpsocket.recvfrom_nonblock(maxlen, flags) => [mesg, sender_inet_addr] * * Receives up to _maxlen_ bytes from +udpsocket+ using recvfrom(2) after * O_NONBLOCK is set for the underlying file descriptor. diff --git a/ext/socket/unixserver.c b/ext/socket/unixserver.c index 9bd959d439..df9849703b 100644 --- a/ext/socket/unixserver.c +++ b/ext/socket/unixserver.c @@ -31,8 +31,8 @@ unix_svr_init(VALUE sock, VALUE path) * call-seq: * unixserver.accept => unixsocket * - * Accepts a new connection. - * It returns new UNIXSocket object. + * Accepts an incoming connection. + * It returns a new UNIXSocket object. * * UNIXServer.open("/tmp/sock") {|serv| * UNIXSocket.open("/tmp/sock") {|c| @@ -59,7 +59,7 @@ unix_accept(VALUE sock) /* * call-seq: - * unixserver.accept_nonblock => unixsocket + * unixserver.accept_nonblock => unixsocket * * Accepts an incoming connection using accept(2) after * O_NONBLOCK is set for the underlying file descriptor. -- cgit v1.2.3