Class/Module Index [+]

Quicksearch

Fluent::SocketUtil

Public Class Methods

create_udp_socket(host) click to toggle source
# File lib/fluent/plugin/socket_util.rb, line 3
def create_udp_socket(host)
  require 'ipaddr'

  if IPAddr.new(IPSocket.getaddress(host)).ipv4?
    UDPSocket.new
  else
    UDPSocket.new(Socket::AF_INET6)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.