aboutsummaryrefslogtreecommitdiffstats
path: root/ext/socket
Commit message (Collapse)AuthorAgeFilesLines
* update doc.akr2012-02-021-4/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Do not define _WIN32_WINNT multiple timesluislavena2012-01-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/lib/socket.rb (family_addrinfo): don't require protocolakr2012-01-091-1/+4
| | | | | | | | 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
* * ext/socket/lib/socket.rb (family_addrinfo): return the givenakr2012-01-091-0/+3
| | | | | | | | | 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
* * ext/bigdecimal/README: Update redmine.ruby-lang.org to bugs.ruby-lang.orgkazu2011-12-201-1/+1
| | | | | | | | | * ext/socket/ancdata.c: ditto * test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb: ditto * test/syck/test_yaml.rb: ditto * doc/ChangeLog-1.9.3: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/extconf.rb: forgotten to define HAVE_SOCKETPAIR forusa2011-12-081-0/+1
| | | | | | | windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/{subst.h,win32.h}, ext/socket/rubysocket.h: revertusa2011-12-052-2/+3
| | | | | | | | | r33876. [ruby-core:41475] [Bug #5706] * ext/socket/extconf.rb: the alternative hack for [Bug #5675]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/extconf.rb: get rid of warnings bynobu2011-12-011-4/+5
| | | | | | -Wmissing-declarations or -Wold-style-definition options. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/extconf.rb: add arguments for macro calls.nobu2011-12-011-6/+6
| | | | | | [ruby-core:41370] [Bug#5681] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/subst.h: moved Windows specific substitions fromnobu2011-11-281-0/+1
| | | | | | | win32.h. * ext/socket/rubysocket.h: include ruby/subst.h. [Bug #5675] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/rubysocket.h (rsock_recvmsg): declared.akr2011-11-063-10/+13
| | | | | | | | | | * ext/socket/ancdata.c (rsock_recvmsg): extracted from nogvl_recvmsg_func. (nogvl_recvmsg_func): use rsock_recvmsg. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (rsock_socketpair0): refactored.akr2011-11-051-10/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/init.c (rsock_socket0): don't clear try_sock_cloexec ifakr2011-11-051-20/+16
| | | | | | | | SOCK_CLOEXEC is not a reason for EINVAL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/init.c (rsock_socket0): extract single socket() call withakr2011-11-051-18/+27
| | | | | | | | CLOEXEC handling from rsock_socket. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (rsock_socketpair0): don't clearakr2011-11-051-18/+22
| | | | | | | | try_sock_cloexec if SOCK_CLOEXEC is not a reason for EINVAL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * whitespace cleanup.nobu2011-11-041-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (rsock_socketpair0): extracted fromakr2011-11-031-6/+21
| | | | | | | | rsock_socketpair to set close-on-exec flag for each socketpair() call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/init.c (rsock_socket): set close-on-exec flag whennagachika2011-11-031-1/+9
| | | | | | SOCK_CLOEXEC is not available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_maygvl_fd_fix_cloexec): renamed from fd_set_cloexec.akr2011-11-011-3/+10
| | | | | | | | | | | | * internal.h (rb_maygvl_fd_fix_cloexec): declared. * ext/socket/init.c (cloexec_accept): use rb_maygvl_fd_fix_cloexec. (rsock_s_accept_nonblock): use rb_update_max_fd. (rsock_s_accept): use rb_update_max_fd. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/init.c (cloexec_accept): new function to use accept4 ifakr2011-10-312-2/+28
| | | | | | | | | | | | available. (rsock_s_accept_nonblock): use cloexec_accept. (accept_blocking): ditto. * ext/socket/extconf.rb: check accept4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/ancdata.c (nogvl_recvmsg_func): use MSG_CMSG_CLOEXEC ifakr2011-10-312-2/+12
| | | | | | | | | | available. * ext/socket/unixsocket.c (recvmsg_blocking): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (rsock_socketpair): use SOCK_CLOEXEC ifakr2011-10-311-5/+26
| | | | | | | | available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (rsock_socketpair): extracted fromakr2011-10-311-5/+16
| | | | | | | rsock_sock_s_socketpair. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/init.c (rsock_socket): use SOCK_CLOEXEC if available.akr2011-10-311-3/+22
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h (rb_fd_fix_cloexec): renamed fromakr2011-10-314-8/+8
| | | | | | | | | | | | | | | | | | | rb_fd_set_cloexec. * io.c: follow the above renaming. * ext/pty/pty.c: ditto. * ext/socket/init.c: ditto. * ext/socket/socket.c: ditto. * ext/socket/ancdata.c: ditto. * ext/socket/unixsocket.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h (rb_fd_set_cloexec): declared.akr2011-10-224-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * io.c (rb_fd_set_cloexec): new function. (ruby_dup): call rb_fd_set_cloexec to set close-on-exec flag. (rb_sysopen_internal): ditto. (rb_pipe): ditto. (io_reopen): ditto. (io_cntl): ditto. * process.c (rb_f_exec): change the default :close_others option to true. (rb_f_system): ditto. (move_fds_to_avoid_crash): call rb_fd_set_cloexec to set close-on-exec flag. (ruby_setsid): ditto. (rb_daemon): ditto. * thread_pthread.c (rb_thread_create_timer_thread): call rb_fd_set_cloexec to set close-on-exec flag. * ruby.c (load_file_internal): ditto. * file.c (rb_file_s_truncate): ditto. (file_load_ok): ditto. * random.c (fill_random_seed): ditto. * ext/pty/pty.c (chfunc): ditto. (get_device_once): ditto. * ext/openssl/ossl_bio.c (ossl_obj2bio): ditto. * ext/socket/init.c (rsock_socket): ditto. (rsock_s_accept_nonblock): ditto. (rsock_s_accept): ditto. * ext/socket/socket.c (rsock_sock_s_socketpair): ditto. * ext/socket/ancdata.c (discard_cmsg): ditto. (make_io_for_unix_rights): ditto. * ext/socket/unixsocket.c (unix_recv_io): ditto. * ext/io/console/console.c (console_dev): ditto. [ruby-core:38140] [Feature #5041] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket: Make Socket documentation appear. Add documentation fordrbrain2011-08-1515-103/+245
| | | | | | | | 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
* * ext/socket/ipsocket.c (init_inetsock_internal): use SOMAXCONN forakr2011-08-114-5/+5
| | | | | | | | | | | | | | | 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
* * ext/socket/lib/socket.rb: fix argument check in the previous commit.akr2011-08-101-3/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/lib/socket.rb (Socket.tcp): add :connect_timeout option.akr2011-08-101-12/+83
| | | | | | | | | (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
* * ext/socket/lib/socket.rb (udp_server_sockets): unused variableakr2011-07-291-2/+0
| | | | | | | | 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
* * ext/socket/mkconstants.rb: fix typos.akr2011-07-291-17/+17
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/mkconstants.rb: use whitespaces as a separator.akr2011-07-291-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/mkconstants.rb: add documents for constants.akr2011-07-291-348/+354
| | | | | | | patch by Eric Hodel. [ruby-core:37853] [Bug #4989] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/extconf.rb: refine the recvmsg test.akr2011-07-241-12/+38
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/extconf.rb: fix the recvmsg test.akr2011-07-241-3/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/extconf.rb: test recvmsg allocates file descriptors forakr2011-07-232-5/+94
| | | | | | | | | | fd passing even with MSG_PEEK. * ext/socket/ancdata.c: use the above test result. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_update_max_fd): validate fd.akr2011-07-233-19/+21
| | | | | | | | | | | | | | | | | | * ext/socket/rubysocket.h (rsock_discard_cmsg_resource): add msg_peek_p argument for the declaration. * ext/socket/ancdata.c (discard_cmsg): add msg_peek_p argument. assume FreeBSD, NetBSD and MacOS X doesn't generate passed fd when MSG_PEEK. (rsock_discard_cmsg_resource): add msg_peek_p argument. (bsock_recvmsg_internal): call rsock_discard_cmsg_resource with msg_peek_p argument. * ext/socket/unixsocket.c (unix_recv_io): call rsock_discard_cmsg_resource with msg_peek_p argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/ancdata.c (discard_cmsg): workaround for MacOS X Lion.akr2011-07-211-2/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h (rb_update_max_fd): declaration moved fromakr2011-07-204-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | internal.h. * file.c: ditto. * io.c: call rb_update_max_fd for each new fds. * process.c: ditto. * random.c: ditto. * ruby.c: ditto. * ext/io/console/console.c: ditto. * ext/openssl/ossl_bio.c: ditto. * ext/pty/pty.c: ditto. * ext/socket/init.c: ditto. * ext/socket/socket.c: ditto. * ext/socket/ancdata.c: ditto. * ext/socket/unixsocket.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/depend (SOCK_HEADERS): use $(top_srcdir) instaed ofkosaki2011-06-221-1/+1
| | | | | | | | $(topdir). sorry! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h: move rb_thread_io_blocking_region() declarationkosaki2011-06-213-1/+4
| | | | | | | | | | | | | | from intern.h to internal.h. It's still experimental API and need more discussion. [ruby-dev:43698] * include/ruby/intern.h: ditto. * ext/socket/rubysocket.h: include internal.h. * ext/socket/depend: add internal.h dependency. * ext/socket/extconf.rb: add $INCFLAGS to topdir. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update doc.akr2011-06-171-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/unixsocket.c (unix_send_io): race condition fixed.akr2011-06-131-6/+8
| | | | | | | | | | (unix_recv_io): ditto. fixed by Eric Wong. [ruby-core:35574] * test/socket/test_unix.rb: test added for above problem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.nobu2011-05-151-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (rb_obj_equal): Add documentation. Patch by Vincent Batts.drbrain2011-05-111-1/+7
| | | | | | | | | | [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
* * Various .document files: Update .document files to match files whichdrbrain2011-05-111-11/+11
| | | | | | | have documentation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/init.c (wait_connectable): fix error handling code.kosaki2011-05-041-9/+29
| | | | | | | | RB_WAITFD_OUT is turned on even though an error occur. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/init.c (wait_connectable): use rb_wait_for_single_fd().kosaki2011-05-041-60/+12
| | | | | | | | | | | The patch was written by Eric Wong. [Ruby 1.9 - Feature #4531] * ext/socket/init.c (try_wait_connectable, wait_connectable_ensure): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/init.c (rsock_connect): add to care EINTR. basedkosaki2011-05-011-0/+6
| | | | | | | | on a patch from Eric Wong at [ruby-core:35621][Bug #4555] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e