summaryrefslogtreecommitdiff
path: root/ext/socket
AgeCommit message (Collapse)Author
2022-11-10Transition shape when object's capacity changesJemma Issroff
This commit adds a `capacity` field to shapes, and adds shape transitions whenever an object's capacity changes. Objects which are allocated out of a bigger size pool will also make a transition from the root shape to the shape with the correct capacity for their size pool when they are allocated. This commit will allow us to remove numiv from objects completely, and will also mean we can guarantee that if two objects share shapes, their IVs are in the same positions (an embedded and extended object cannot share shapes). This will enable us to implement ivar sets in YJIT using object shapes. Co-Authored-By: Aaron Patterson <[email protected]> Notes: Merged: https://github.com/ruby/ruby/pull/6699
2022-11-09Use `rb_sprintf` instead of deprecated `sprintf`Nobuyoshi Nakada
2022-11-04Substitute from the actual netinet6/in6.hNobuyoshi Nakada
Xcode no longer links the system include files directory to `/usr`. Extract the actual header file path from cpp output.
2022-10-08Try `nil` as default for 'default timeout'. (#6509)Samuel Williams
Notes: Merged-By: ioquatix <[email protected]>
2022-10-07Add IO#timeout attribute and use it for blocking IO operations. (#5653)Samuel Williams
Notes: Merged-By: ioquatix <[email protected]>
2022-09-21sockopt adding Linux constants, SO_INCOMING_CPU/SO_INCOMING_NAPI_ID.David Carlier
2022-09-21openbsd sockets add SO_RTABLE constantDavid Carlier
Notes: Merged: https://github.com/ruby/ruby/pull/4635
2022-09-21Introduces FreeBSD's SO_USER_COOKIE among socketopt's options.David Carlier
Notes: Merged: https://github.com/ruby/ruby/pull/4206
2022-09-21sockets add `TCP_CONNECTION_INFO` and `TCP_KEEPALIVE` constants.David CARLIER
Notes: Merged: https://github.com/ruby/ruby/pull/5871
2022-09-21socket add FreeBSD's SO_SETFIB constant.David CARLIER
Notes: Merged: https://github.com/ruby/ruby/pull/5917
2022-09-20[DOC] socket: fix wrong sample addresses (#6372)Sutou Kouhei
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 Notes: Merged-By: kou <[email protected]>
2022-07-21Expand tabs [ci skip]Takashi Kokubun
[Misc #18891] Notes: Merged: https://github.com/ruby/ruby/pull/6094
2022-03-17Fix broken links of rdocKazuhiro NISHIYAMA
- `www.ruby-lang.org` links to `./www.ruby-lang.org` - `cgi['field_name']` links to `./'field_name'`
2022-02-22[Feature #18249] Update dependenciesPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/5474
2022-01-18[Feature #18491] Drop support for HP-UXPeter Zhu
IA64 support was dropped in ticket #15894, so we can drop support for HP-UX. Notes: Merged: https://github.com/ruby/ruby/pull/5457
2021-11-21Update dependenciesNobuyoshi Nakada
2021-11-02ext/socket/extconf.rb: Fix the chech if if_indextoname is availableYusuke Endoh
The check had not work because "headers" were not passed.
2021-10-14Prefer the reentrant versions of gmtime and localtimeNobuyoshi Nakada
2021-10-12Add more socket constantsKazuhiro NISHIYAMA
from http://manpages.ubuntu.com/manpages/focal/en/man2/socket.2.html Notes: Merged: https://github.com/ruby/ruby/pull/4955
2021-10-05ruby tool/update-deps --fix卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/4909
2021-09-23[DOC] Use `unpack1` instead of `unpack(template)[0]` [ci skip]Kazuhiro NISHIYAMA
2021-08-20undefine alloc functions for C extensionsMike Dalessio
per guidance in doc/extension.rdoc, these classes now undefine their alloc functions: - ObjectSpace::InternalObjectWrapper - Socket::Ifaddr Notes: Merged: https://github.com/ruby/ruby/pull/4604
2021-07-12Avoid calling `fstat` on things we already know are valid sockets.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4645
2021-06-23Convert ssize_t properlyNobuyoshi Nakada
2021-06-22Deprecate and rework old (fd) centric functions.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4592
2021-06-22Direct io for accept, send, sendmsg, recvfrom, and related methods.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4477
2021-06-14Removed no longer used variablesNobuyoshi Nakada
2021-06-14Add scheduler hook `Addrinfo.getaddrinfo`. (#4375)Samuel Williams
Co-authored-by: Bruno Sutic <[email protected]> Notes: Merged-By: ioquatix <[email protected]>
2021-04-13dependency updates卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/4371
2021-02-04[DOC] Fix typo in ext/socket/socket.c [ci skip]Dimitris Zorbas
Notes: Merged: https://github.com/ruby/ruby/pull/4150
2021-01-05[DOC] Fix grammar: "is same as" -> "is the same as"Marcus Stollsteimer
2020-12-29Fix compile error of sockssocketMasaki Matsushita
The patch is provided by PhobosK (Phobos Kappa). This should be backported to Ruby 3.0. [Feature #17187]
2020-12-22Removed rb_cData entityNobuyoshi Nakada
* 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 Notes: Merged: https://github.com/ruby/ruby/pull/3961
2020-12-18socket is ractor-safe.Koichi Sasada
2020-12-11Remove unimplemented parameter from commentMasaki Matsushita
:resolv_timeout of TCPSocket.new is not implemented for now.
2020-12-10Add connect_timeout to TCPSocketMasaki Matsushita
Add connect_timeout to TCPSocket.new in the same way as Socket.tcp. Closes [Feature #17187]
2020-12-07Revert getaddrinfo_a()Masaki Matsushita
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]
2020-12-06Call cleanup function for getaddrinfo_a(3) only before fork()Masaki Matsushita
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().
2020-12-06Extend sleep time to 1.5 second in rb_getaddrinfo_a_before_exec()Masaki Matsushita
After 94d49ed31c, TestSocket#test_getaddrinfo_after_fork fails in some platforms. To avoid this, the change extends sleep time to 1.5 second.
2020-12-04Add a hook before fork() for getaddrinfo_a()Masaki Matsushita
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]
2020-11-01ext/socket/rubysocket.h: avoid the conflict of T_DATA definition in AIXRei Odaira
2020-10-28Use public allocators for creating new T_OBJECT objectsAaron Patterson
This way the header flags and object internals are set correctly Notes: Merged: https://github.com/ruby/ruby/pull/3719
2020-09-27ext/socket/ipsocket.c: prevent "warning: unused variable 'resolv_timeout'"Yusuke Endoh
2020-09-25Add comments for resolv_timeoutMasaki Matsushita
2020-09-25Add resolve_timeout to TCPSocket [Feature #17134]Masaki Matsushita
2020-08-29Show deprecation warning on Socket.gethostbyname and Socket.gethostbyaddrMasaki Matsushita
2020-08-28Show deprecation warning on TCPSocket.gethostbynameMasaki Matsushita
2020-08-27Adjust indents [ci skip]Nobuyoshi Nakada
2020-08-27sed -i '/rmodule.h/d'卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3347
2020-08-27Make Socket.getaddrinfo interruptible (#2827)Kir Shatrov
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 Notes: Merged-By: mmasaki <[email protected]>