Module: Fluent::SocketUtil
- Defined in:
- lib/fluent/plugin/socket_util.rb
Defined Under Namespace
Classes: BaseInput, TcpHandler, UdpHandler
Class Method Summary collapse
Class Method Details
.create_udp_socket(host) ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/fluent/plugin/socket_util.rb', line 25 def create_udp_socket(host) if IPAddr.new(IPSocket.getaddress(host)).ipv4? UDPSocket.new else UDPSocket.new(Socket::AF_INET6) end end |