From 6382f5cc91ac9e36776bc854632d9a1237250da7 Mon Sep 17 00:00:00 2001 From: Masaki Matsushita Date: Mon, 31 Dec 2018 12:17:39 +0900 Subject: Support timeout for Addrinfo Addrinfo.getaddrinfo and .foreach now accepts :timeout in seconds as a keyword argument. If getaddrinfo_a(3) is available, the timeout will be applied for name resolution. Otherwise, it will be ignored. Socket.tcp accepts :resolv_timeout to use this feature. --- include/ruby/intern.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/ruby') diff --git a/include/ruby/intern.h b/include/ruby/intern.h index ed1a4cfdd5..4fa00d55e6 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -936,6 +936,7 @@ VALUE rb_time_num_new(VALUE, VALUE); struct timeval rb_time_interval(VALUE num); struct timeval rb_time_timeval(VALUE time); struct timespec rb_time_timespec(VALUE time); +struct timespec rb_time_timespec_interval(VALUE num); VALUE rb_time_utc_offset(VALUE time); /* variable.c */ VALUE rb_mod_name(VALUE); -- cgit v1.2.3