# File lib/fluent/plugin/socket_util.rb, line 21 def create_udp_socket(host) require 'ipaddr' if IPAddr.new(IPSocket.getaddress(host)).ipv4? UDPSocket.new else UDPSocket.new(Socket::AF_INET6) end end
# File lib/fluent/plugin/socket_util.rb, line 21 def create_udp_socket(host) require 'ipaddr' if IPAddr.new(IPSocket.getaddress(host)).ipv4? UDPSocket.new else UDPSocket.new(Socket::AF_INET6) end end