summaryrefslogtreecommitdiff
path: root/ext/socket
Commit message (Collapse)AuthorAgeFilesLines
* Try `nil` as default for 'default timeout'. (#6509)Samuel Williams2022-10-084-6/+6
|
* Add IO#timeout attribute and use it for blocking IO operations. (#5653)Samuel Williams2022-10-075-6/+10
|
* sockopt adding Linux constants, SO_INCOMING_CPU/SO_INCOMING_NAPI_ID.David Carlier2022-09-211-0/+2
|
* openbsd sockets add SO_RTABLE constantDavid Carlier2022-09-211-0/+1
|
* Introduces FreeBSD's SO_USER_COOKIE among socketopt's options.David Carlier2022-09-211-0/+1
|
* sockets add `TCP_CONNECTION_INFO` and `TCP_KEEPALIVE` constants.David CARLIER2022-09-211-0/+2
|
* socket add FreeBSD's SO_SETFIB constant.David CARLIER2022-09-211-0/+1
|
* [DOC] socket: fix wrong sample addresses (#6372)Sutou Kouhei2022-09-201-2/+2
| | | | | | | | | | | | | IPv6 link local address is fe80::/10 not ff80::/10: https://www.rfc-editor.org/rfc/rfc4291.html Link-Local unicast 1111111010 FE80::/10 2.5.6 IPv6 (deprecated) site local address is fec0::/10 not ffc0::/10: https://www.rfc-editor.org/rfc/rfc3513.html Site-local unicast 1111111011 FEC0::/10 2.5.6
* Expand tabs [ci skip]Takashi Kokubun2022-07-2119-1410/+1410
| | | | [Misc #18891]
* Fix broken links of rdocKazuhiro NISHIYAMA2022-03-171-7/+7
| | | | | - `www.ruby-lang.org` links to `./www.ruby-lang.org` - `cgi['field_name']` links to `./'field_name'`
* [Feature #18249] Update dependenciesPeter Zhu2022-02-221-0/+15
|
* [Feature #18491] Drop support for HP-UXPeter Zhu2022-01-181-3/+2
| | | | | IA64 support was dropped in ticket #15894, so we can drop support for HP-UX.
* Update dependenciesNobuyoshi Nakada2021-11-211-15/+0
|
* ext/socket/extconf.rb: Fix the chech if if_indextoname is availableYusuke Endoh2021-11-021-2/+5
| | | | The check had not work because "headers" were not passed.
* Prefer the reentrant versions of gmtime and localtimeNobuyoshi Nakada2021-10-141-3/+9
|
* Add more socket constantsKazuhiro NISHIYAMA2021-10-121-1/+32
| | | | from http://manpages.ubuntu.com/manpages/focal/en/man2/socket.2.html
* ruby tool/update-deps --fix卜部昌平2021-10-051-0/+135
|
* [DOC] Use `unpack1` instead of `unpack(template)[0]` [ci skip]Kazuhiro NISHIYAMA2021-09-231-1/+1
|
* undefine alloc functions for C extensionsMike Dalessio2021-08-201-0/+1
| | | | | | | | per guidance in doc/extension.rdoc, these classes now undefine their alloc functions: - ObjectSpace::InternalObjectWrapper - Socket::Ifaddr
* Avoid calling `fstat` on things we already know are valid sockets.Samuel Williams2021-07-122-20/+28
|
* Convert ssize_t properlyNobuyoshi Nakada2021-06-231-1/+1
|
* Deprecate and rework old (fd) centric functions.Samuel Williams2021-06-225-54/+58
|
* Direct io for accept, send, sendmsg, recvfrom, and related methods.Samuel Williams2021-06-226-86/+84
|
* Removed no longer used variablesNobuyoshi Nakada2021-06-141-1/+0
|
* Add scheduler hook `Addrinfo.getaddrinfo`. (#4375)Samuel Williams2021-06-144-278/+316
| | | Co-authored-by: Bruno Sutic <code@brunosutic.com>
* dependency updates卜部昌平2021-04-131-15/+0
|
* [DOC] Fix typo in ext/socket/socket.c [ci skip]Dimitris Zorbas2021-02-041-2/+2
|
* [DOC] Fix grammar: "is same as" -> "is the same as"Marcus Stollsteimer2021-01-052-4/+4
|
* Fix compile error of sockssocketMasaki Matsushita2020-12-291-1/+1
| | | | | | | | The patch is provided by PhobosK (Phobos Kappa). This should be backported to Ruby 3.0. [Feature #17187]
* Removed rb_cData entityNobuyoshi Nakada2020-12-222-2/+2
| | | | | | | * Use the wrapper of rb_cObject instead of data access * Replaced rest of extentions * Updated the version guard for Data * Added the version guard of rb_cData
* socket is ractor-safe.Koichi Sasada2020-12-181-0/+2
|
* Remove unimplemented parameter from commentMasaki Matsushita2020-12-111-2/+1
| | | | :resolv_timeout of TCPSocket.new is not implemented for now.
* Add connect_timeout to TCPSocketMasaki Matsushita2020-12-108-20/+38
| | | | | | Add connect_timeout to TCPSocket.new in the same way as Socket.tcp. Closes [Feature #17187]
* Revert getaddrinfo_a()Masaki Matsushita2020-12-075-265/+0
| | | | | | | | getaddrinfo_a() gets stuck after fork(). To avoid this, we need 1 second sleep to wait for internal worker threads of getaddrinfo_a() to be finished, but that is unacceptable. [Bug #17220] [Feature #17134] [Feature #17187]
* Call cleanup function for getaddrinfo_a(3) only before fork()Masaki Matsushita2020-12-061-2/+2
| | | | | | Previously, rb_getaddrinfo_a_before_exec() is called from before_exec(). However, the function needs to be called only before fork(). The change moves it to before_fork().
* Extend sleep time to 1.5 second in rb_getaddrinfo_a_before_exec()Masaki Matsushita2020-12-061-1/+4
| | | | | After 94d49ed31c, TestSocket#test_getaddrinfo_after_fork fails in some platforms. To avoid this, the change extends sleep time to 1.5 second.
* Add a hook before fork() for getaddrinfo_a()Masaki Matsushita2020-12-041-0/+116
| | | | | | | | | We need stop worker threads in getaddrinfo_a() before fork(). This change adds a hook before fork() that cancel all outstanding requests and wait for all ongoing requests. Then, it waits for all worker threads to be finished. Fixes [Bug #17220]
* ext/socket/rubysocket.h: avoid the conflict of T_DATA definition in AIXRei Odaira2020-11-011-1/+1
|
* Use public allocators for creating new T_OBJECT objectsAaron Patterson2020-10-282-4/+4
| | | | This way the header flags and object internals are set correctly
* ext/socket/ipsocket.c: prevent "warning: unused variable 'resolv_timeout'"Yusuke Endoh2020-09-271-2/+1
|
* Add comments for resolv_timeoutMasaki Matsushita2020-09-251-1/+3
|
* Add resolve_timeout to TCPSocket [Feature #17134]Masaki Matsushita2020-09-256-8/+52
|
* Show deprecation warning on Socket.gethostbyname and Socket.gethostbyaddrMasaki Matsushita2020-08-291-0/+3
|
* Show deprecation warning on TCPSocket.gethostbynameMasaki Matsushita2020-08-281-0/+1
|
* Adjust indents [ci skip]Nobuyoshi Nakada2020-08-272-14/+14
|
* sed -i '/rmodule.h/d'卜部昌平2020-08-271-15/+0
|
* Make Socket.getaddrinfo interruptible (#2827)Kir Shatrov2020-08-273-17/+23
| | | | | | | | | | | | | | | | | | | Before, Socket.getaddrinfo was using a blocking getaddrinfo(3) call. That didn't allow to wrap it into Timeout.timeout or interrupt the thread in any way. Combined with the default 10 sec resolv timeout on many Unix systems, this can have a very noticeable effect on production Ruby apps being not resilient to DNS outages and timing out name resolution, and being unable to fail fast even with Timeout.timeout. Since we already have support for getaddrinfo_a(3), the async version of getaddrinfo, we should be able to make Socket.getaddrinfo leverage that when getaddrinfo_a version is available in the system (hence #ifdef HAVE_GETADDRINFO_A). Related tickets: https://bugs.ruby-lang.org/issues/16476 https://bugs.ruby-lang.org/issues/16381 https://bugs.ruby-lang.org/issues/14997
* sed -i '/r_cast.h/d'卜部昌平2020-08-271-15/+0
|
* sed -i '\,2/extern.h,d'卜部昌平2020-08-271-15/+0
|
* Thread scheduler for light weight concurrency.Samuel Williams2020-05-145-199/+66
|