Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

class method

Socket.tcp_fast_fallback

Socket.tcp_fast_fallback → true or false

Returns whether Happy Eyeballs Version 2 (RFC 8305), which is provided starting from Ruby 3.4 when using TCPSocket.new and Socket.tcp, is enabled or disabled.

If true, it is enabled for TCPSocket.new and Socket.tcp. (Note: Happy Eyeballs Version 2 is not provided when using TCPSocket.new on Windows.)

If false, Happy Eyeballs Version 2 is disabled.

For details on Happy Eyeballs Version 2, see Socket.tcp_fast_fallback=.