summaryrefslogtreecommitdiff
path: root/ext/socket/lib/socket.rb
AgeCommit message (Collapse)Author
2018-02-17socket.rb: protected connect_internalnobu
* ext/socket/lib/socket.rb (Addrinfo#connect_internal): make protected for Addrinfo#connect_to, instead of private and send. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-27socket: fix BasicSocket#*_nonblock buffering bugs from r58400normal
IO#read_nonblock and IO#write_nonblock take into account buffered data, so the Linux-only BasicSocket#read_nonblock and BasicSocket#write_nonblock methods must, too. This bug was only introduced in r58400 ("socket: avoid fcntl for read/write_nonblock on Linux") and does not affect any stable release. * ext/socket/basicsocket.c (rsock_init_basicsocket): * ext/socket/init.c (rsock_s_recvfrom_nonblock): * ext/socket/init.c (rsock_init_socket_init): * ext/socket/lib/socket.rb (def read_nonblock): * ext/socket/lib/socket.rb (def write_nonblock): * ext/socket/rubysocket.h (static inline void rsock_maybe_wait_fd): * test/socket/test_basicsocket.rb (def test_read_write_nonblock): [Feature #13362] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-22Fixed misspelling words.hsbt
These are detected by https://github.com/client9/misspell git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-22Add missing `buf` parameter to `recv_nonblock` doc [ci skip]nobu
[Fix GH-1725] From: yuuji.yaginuma <yuuji.yaginuma@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-19socket: avoid fcntl for read/write_nonblock on Linuxnormal
On platforms where MSG_DONTWAIT works reliably on all sockets (so far, I know of Linux), we can avoid fcntl syscalls and implement IO#write_nonblock and IO#read_nonblock in terms of the socket-specific send and recv family of syscalls. This avoids side effects on the socket, and also encourages generic code to be written in cases where IO wrappers like OpenSSL::SSL::SSLSocket are used. Perhaps in the future, side-effect-free non-blocking I/O can be standard on all files and OSes: https://cr.yp.to/unix/nonblock.html * ext/socket/lib/socket.rb (read_nonblock, write_nonblock): Linux-specific wrapper without side effects [ruby-core:80780] [Feature #13362] * test/socket/test_basicsocket.rb (test_read_write_nonblock): new test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-11Socket.udp_server_sockets: use symbol procnormal
Symbol proc is shorter human and machine code; and also avoids needing to name variables. * ext/socket/lib/socket.rb (Socket.udp_server_sockets): use symbol proc git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-09Get rid of inifinity retry loop in Socket.udp_server_socketsusa
* ext/socket/lib/socket.rb (Socket.udp_server_sockets): remove duplicated addresses before passing it to ip_sockets_port0 because it causes Errno::EADDRINUSE and retry forever. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-23Revert r57690 except for read_nonblocknobu
https://github.com/ruby/ruby/pull/1527#issuecomment-281867551 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-23[DOC] mark up literalsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-23[DOC] keyword argument _exception_nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-23socket.rb: [DOC] fix nonblock methodsnobu
* ext/socket/lib/socket.rb (BasicSocket#recv_nonblock): fix exception class and symbol. * ext/socket/lib/socket.rb (BasicSocket#recvmsg_nonblock): ditto. * ext/socket/lib/socket.rb (Socket#recvfrom_nonblock): fix the method name. * ext/socket/lib/socket.rb (UDPSocket#recvfrom_nonblock): both. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-23[DOC] {read,write}_nonblock with exception: falsenobu
Update docs to reflect EOF behavior change of read_nonblock and write_nonblock when using `exception: false`. [Fix GH-1527] Author: Russell Davis <russell-stripe@users.noreply.github.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-21socket: use symbol proc for IO#close loopsnormal
Made possible by r56795, this reduces human and byte code size. * ext/socket/lib/socket.rb (self.ip_sockets_port0, self.tcp_server_sockets_port0, self.tcp_server_sockets, self.udp_server_sockets): use symbol proc git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-15socket.rb: remove closed checksnobu
* ext/socket/lib/socket.rb: remove unnecessary closed checks, close on closed socket no longer raises an exception. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-14socket.rb: kwargsnobu
* ext/socket/lib/socket.rb (connect_{from,to}, connect): let use keyword arguments. * ext/socket/lib/socket.rb (Socket.tcp): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-27socket: fix rdoc of UDPSocket#recvfrom_nonblockrhe
* ext/socket/lib/socket.rb (UDPSocket#recvfrom_nonblock): [DOC] Remove a false statement "If _maxlen_ is omitted, its default value is 65536." maxlen, the first parameter, cannot be omitted as the method signature indicates. This hasn't changed ever since it was first implemented. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-14* ext/socket/lib/socket.rb: use safe navigation operator.hsbt
[fix GH-1142] Patch by @mlarraz * lib/drb/extservm.rb: ditto. * lib/net/http.rb: ditto. * lib/net/http/response.rb: ditto. * lib/scanf.rb: ditto. * lib/uri/generic.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-19* ext/socket/ancdata.c: Check buffer full and ignore MSG_TRUNC flag.akr
buffer fullness is more robust to detect the message is too big for the buffer. AIX 7.1 recvmsg doesn't set MSG_TRUNC for rflags when MSG_PEEK is given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-17socket: fix recvmsg without argumentnormal
* ext/socket/ancdata.c (bsock_recvmsg_internal): grow buffer on unspecified maxdatlen [ruby-core:71517] [Bug #11701] * ext/socket/lib/socket.rb (Socket#recvmsg): nil default for dlen (Socket#recvmsg_nonblock): ditto * test/socket/test_socket.rb (test_recvmsg_udp_no_arg): new test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-17* ext/socket/lib/socket.rb (Socket#recvmsg{,_nonblock}): default valuesusa
of clen must be nil. * ext/socket/ancdata.c (bsock_sendmsg_internal): handle nil of clen. fixes test errors introduced at r52602. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-17* ext/socket/lib/socket.rb: UNIXSocket is not always exists. fixesusa
install error on Windows, introduced at r52601. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-17socket: update doc for recvfrom_nonblock [ci skip]normal
* ext/socket/lib/socket.rb (Socket#recvfrom_nonblock): UDPSocket#recvfrom_nonblock): update doc for `exception: false` and destination buffer [ruby-core:69542] [Feature #11229] [ruby-core:69543] [Feature #11242] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-17socket: avoid exceptions in wrapper codenormal
* ext/socket/lib/socket.rb (Socket.accept_loop): avoid exceptions (Socket.udp_server_recv): ditto Exceptions for common "errors" make debug output noisy and allocations+backtrace generation hurt performance. [ruby-core:66385] [ruby-core:69473] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-17socket: avoid arg parsing in bsock_sendmsg_internalnormal
* ext/socket/ancdata.c (bsock_sendmsg_internal): avoid arg parsing [ruby-core:71439] [Feature #11339] (rsock_bsock_sendmsg): make private, adjust for above (rsock_bsock_sendmsg_nonblock): ditto * ext/socket/rubysocket.h: adjust prototypes (rsock_opt_false_p): remove * ext/socket/basicsocket.c (rsock_init_basicsocket): define private methods * ext/socket/lib/socket.rb (BasicSocket#sendmsg): new wrapper (BasicSocket#sendmsg_nonblock): ditto target 0: a (ruby 2.3.0dev (2015-11-12 trunk 52550) [x86_64-linux]) target 1: b (ruby 2.3.0dev (2015-11-12 avoid-kwarg-capi 52550) [x86_64-linux] ----------------------------------------------------------- sendmsg_nonblock require 'socket' nr = 1_000_000 i = 0 msg = '.' buf = '.' begin r, w = UNIXSocket.pair(:SEQPACKET) while i < nr i += 1 w.sendmsg_nonblock(msg, exception: false) r.recv(1, 0, buf) end ensure r.close w.close end ----------------------------------------------------------- raw data: [["sendmsg_nonblock", [[1.875997293740511, 1.8452614955604076, 1.8449317328631878, 1.8418389447033405, 1.869386937469244], [1.5175109766423702, 1.4987873211503029, 1.4989623799920082, 1.47918451577425, 1.5017359890043736]]]] Elapsed time: 16.775453245 (sec) ----------------------------------------------------------- benchmark results: minimum results in each 5 measurements. Execution time (sec) name a b sendmsg_nonblock 1.842 1.479 Speedup ratio: compare with the result of `a' (greater is better) name b sendmsg_nonblock 1.245 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-17socket (bsock_recvmsg_internal): avoid arg parsingnormal
* ext/socket/ancdata.c (bsock_recvmsg_internal): avoid arg parsing (rsock_bsock_recvmsg): adjust for above change (rsock_bsock_recvmsg_nonblock): ditto [ruby-core:71439] [Feature #11339] * ext/socket/rubysocket.h: adjust prototypes for above * ext/socket/basicsocket.c (rsock_init_basicsocket): adjust private methods * ext/socket/lib/socket.rb (BasicSocket#recvmsg): wrapper method (BasicSocket#recvmsg_nonblock): ditto target 0: a (ruby 2.3.0dev (2015-11-12 trunk 52550) [x86_64-linux]) target 1: b (ruby 2.3.0dev (2015-11-12 avoid-kwarg-capi 52550) [x86_64-linux] ----------------------------------------------------------- recvmsg_nonblock require 'socket' nr = 1_000_000 i = 0 msg = '.' buf = '.' begin r, w = UNIXSocket.pair(:SEQPACKET) while i < nr i += 1 w.sendmsg(msg) r.recvmsg_nonblock(1, exception: false) end ensure r.close w.close end ----------------------------------------------------------- raw data: [["recvmsg_nonblock", [[3.721687912940979, 3.6072621569037437, 3.580637402832508, 3.614185404032469, 3.6029579415917397], [2.4694008752703667, 2.4908322244882584, 2.5051278844475746, 2.5037173740565777, 2.548359278589487]]]] Elapsed time: 30.646087052 (sec) ----------------------------------------------------------- benchmark results: minimum results in each 5 measurements. Execution time (sec) name a b recvmsg_nonblock 3.581 2.469 Speedup ratio: compare with the result of `a' (greater is better) name b recvmsg_nonblock 1.450 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-16socket: avoid arg parsing in rsock_s_accept_nonblocknormal
* ext/socket/init.c (rsock_s_accept_nonblock): avoid parsing args [ruby-core:71439] [Feature #11339] * ext/socket/rubysocket.h: adjust prototype * ext/socket/socket.c (sock_accept_nonblock): make private * ext/socket/tcpserver.c (tcp_accept_nonblock): ditto * ext/socket/unixserver.c (unix_accept_nonblock): ditto * ext/socket/lib/socket.rb (Socket#accept_nonblock): implement as wrapper, move RDoc (TCPServer#accept_nonblock): ditto (UNIXServer#accept_nonblock): ditto target 0: a (ruby 2.3.0dev (2015-11-12 trunk 52550) [x86_64-linux]) target 1: b (ruby 2.3.0dev (2015-11-12 avoid-kwarg-capi 52550) [x86_64-linux] ----------------------------------------------------------- accept_nonblock require 'tempfile' require 'socket' require 'io/wait' nr = 500000 Tempfile.create(%w(accept_nonblock .sock)) do |tmp| path = tmp.path File.unlink(path) s = UNIXServer.new(path) addr = Socket.sockaddr_un(path).freeze nr.times do s.accept_nonblock(exception: false) c = UNIXSocket.new(path) s.wait_readable s.accept_nonblock(exception: false).close c.close end end ----------------------------------------------------------- raw data: [["accept_nonblock", [[4.807877402752638, 4.930681671947241, 4.738454818725586, 4.69268161803484, 4.684675686061382], [4.253904823213816, 4.255124930292368, 4.295955188572407, 4.248479191213846, 4.213303029537201]]]] Elapsed time: 45.123040065 (sec) ----------------------------------------------------------- benchmark results: minimum results in each 5 measurements. Execution time (sec) name a b accept_nonblock 4.685 4.213 Speedup ratio: compare with the result of `a' (greater is better) name b accept_nonblock 1.112 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-16socket: Socket#connect_nonblock avoids arg parsing with C APInormal
* ext/socket/socket.c (sock_connect_nonblock): avoid argument parsing in C. [ruby-core:71439] [Feature #11339] * ext/socket/lib/socket.rb (Socket#connect_nonblock): new wrapper for private method, move RDoc target 0: a (ruby 2.3.0dev (2015-11-12 trunk 52540) [x86_64-linux]) target 1: b (ruby 2.3.0dev (2015-11-12 avoid-kwarg-capi 52540) [x86_64-linux] ----------------------------------------------------------- connect_nonblock require 'tempfile' require 'socket' require 'io/wait' nr = 500000 Tempfile.create(%w(connect_nonblock .sock)) do |tmp| path = tmp.path File.unlink(path) s = UNIXServer.new(path) addr = Socket.sockaddr_un(path).freeze nr.times do c = Socket.new(Socket::AF_UNIX, Socket::SOCK_STREAM) while c.connect_nonblock(addr, exception: false) == :wait_writable c.wait_writable end s.accept.close c.close end end ----------------------------------------------------------- raw data: [["connect_nonblock", [[4.014209181070328, 3.8479955345392227, 3.981342639774084, 4.471840236335993, 3.7867715656757355], [3.639054525643587, 3.58337214961648, 3.525284394621849, 3.52646067738533, 3.511393066495657]]]] Elapsed time: 37.889623996 (sec) ----------------------------------------------------------- benchmark results: minimum results in each 5 measurements. Execution time (sec) name a b connect_nonblock 3.787 3.511 Speedup ratio: compare with the result of `a' (greater is better) name b connect_nonblock 1.078 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-16socket: avoid arg parsing in rsock_s_recvfrom_nonblocknormal
* ext/socket/init.c (rsock_s_recvfrom_nonblock): avoid arg parsing with C API [ruby-core:71439] [Feature #11339] * ext/socket/basicsocket.c (bsock_recv_nonblock): adjust for above change, make private * ext/socket/socket.c (sock_recvfrom_nonblock): ditto * ext/socket/udpsocket.c (udp_recvfrom_nonblock): ditto * ext/socket/lib/socket.rb (BasicSocket#recv_nonblock): new wrapper for private method, move RDoc (Socket#recvfrom_nonblock): ditto (UDPSocket#recvfrom_nonblock): ditto Note, not adding bm_recv_nonblock.rb to benchmark/ directory since it is non-portable. It is only in this commit message. Benchmark results + code target 0: a (ruby 2.3.0dev (2015-11-12 trunk 52540) [x86_64-linux]) target 1: b (ruby 2.3.0dev (2015-11-12 avoid-kwarg-capi 52540) [x86_64-linux] ----------------------------------------------------------- recv_nonblock require 'socket' nr = 1000000 msg = 'hello world' buf = '' size = msg.bytesize UNIXSocket.pair(:SEQPACKET) do |a, b| nr.times do a.sendmsg(msg) b.recv_nonblock(size, 0, buf, exception: false) end end ----------------------------------------------------------- raw data: [["recv_nonblock", [[1.83511221408844, 1.8703329525887966, 1.8448856547474861, 1.859263762831688, 1.8331583738327026], [1.5637447573244572, 1.4062932096421719, 1.4247371144592762, 1.4108827747404575, 1.4802536629140377]]]] Elapsed time: 16.530452496 (sec) ----------------------------------------------------------- benchmark results: minimum results in each 5 measurements. Execution time (sec) name a b recv_nonblock 1.833 1.406 Speedup ratio: compare with the result of `a' (greater is better) name b recv_nonblock 1.304 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-14* ext/socket/lib/socket.rb: Specify frozen_string_literal: true.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-06stdlib: use IO#wait_*able instead of IO.select when possiblenormal
In case a process encounters high-numbered FDs, this allows consistent performance on systems with ppoll support. [ruby-core:35572] * ext/socket/lib/socket.rb (connect_nonblock): use IO#wait_writable * lib/drb/drb.rb (DRB::DRbTCPSocket#alive?): use IO#wait_readable * lib/webrick/httpserver.rb (run): ditto * lib/resolv.rb (request): ditto for single socket case [ruby-core:68943] [Feature #11081] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-20socket: avoid common exceptions when calling connect_nonblocknormal
Errno::EISCONN and IO::WaitReadable exceptions are common, expensive, and noisy under normal use. Avoid raising on them since they are not exceptional. * ext/socket/lib/socket.rb (connect_internal): avoid common exceptions from connect_nonblock. [ruby-core:68909] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13* ext/socket/lib/socket.rb: Don't test $! in "ensure" clause becauseakr
it may be set before the body. Reported by ko1 and mrkn. [ruby-core:59088] [Bug #9247] * lib/cgi/core.rb: Ditto. * lib/drb/ssl.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12fixed wrong document for Socket.tcp by @lann [fix GH-302]hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-24* ext/socket/lib/socket.rb: Doc typos by @vipulnsward [Fixes GH-292]zzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-31* ext/socket/raddrinfo.c (rsock_unix_sockaddr_len): returnshugo
sizeof(sa_familiy_t) if path is empty. see "Autobind Feature" in unix(7) for details. * ext/socket/lib/socket.rb (unix_socket_abstract_name?): treat an empty path as an abstract name. * test/socket/test_unix.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-25* ext/socket/raddrinfo.c (rsock_unixpath_len, init_unix_addrinfo),shugo
ext/socket/unixsocket.c (unixsock_connect_internal, rsock_init_unixsock): calculate the correct address length of an abstract socket. Without this fix, sizeof(struct sockaddr_un) is specified as the length of an abstract socket for bind(2) or connect(2), so the address of the socket is filled with extra NUL characters. See unix(7) for details. * ext/socket/lib/socket.rb (unix_server_socket): don't access the file system if the platform is Linux and path starts with NUL, which means that the socket is an abstract socket. * test/socket/test_unix.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-09* ext/socket/lib/socket.rb (family_addrinfo): don't require protocolakr
equality. For example, protocol 0 and IPPROTO_TCP is not problem for TCP. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-09* ext/socket/lib/socket.rb (family_addrinfo): return the givenakr
addrinfo object. Patch by Ippei Obayashi. [ruby-dev:45095] [Bug #5845] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-15* ext/socket: Make Socket documentation appear. Add documentation fordrbrain
Socket, TCPServer, SOCKSSocket. Patch by Sylvain Daubert. [Ruby 1.9 - Feature #5182] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-11* ext/socket/ipsocket.c (init_inetsock_internal): use SOMAXCONN forakr
listen backlog. * ext/socket/unixsocket.c (rsock_init_unixsock): ditto. * ext/socket/lib/socket.rb (Addrinfo#listen): ditto. (Socket.tcp_server_sockets_port0): ditto. * ext/socket/mkconstants.rb: define SOMAXCONN as 5 if not available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-10* ext/socket/lib/socket.rb: fix argument check in the previous commit.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-10* ext/socket/lib/socket.rb (Socket.tcp): add :connect_timeout option.akr
(Addrinfo#connect_from): add :timeout option. (Addrinfo#connect): ditto. (Addrinfo#connect_to): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-29* ext/socket/lib/socket.rb (udp_server_sockets): unused variableakr
removed. patch by Jeremy Evans. [ruby-core:38600] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-11 * object.c (rb_obj_equal): Add documentation. Patch by Vincent Batts.drbrain
[Ruby 1.9 - Bug #4664] * lib/rexml: ditto * lib/mkmf.rb: ditto * ext/socket/lib/socket.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-23Clean warnings: unused variables.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-22* ext/socket/lib/socket.rb: suppress warnings.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-08* ext/socket/lib/socket.rb (BasicSocket#connect_address): MacOS X 10.6akr
returns "::ffff:a.b.c.d" for IPv4-mapped IPv6 address. [ruby-dev:41215] patch by Tomoyuki Chikanaga. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-22update doc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-22update doc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-22* ext/socket/.document: extracted from ext/.document.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e