Method: Fluent::PluginHelper::Socket#socket_create
- Defined in:
- lib/fluent/plugin_helper/socket.rb
#socket_create(proto, host, port, **kwargs, &block) ⇒ Object
TODO: implement connection pool for specified host
41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/fluent/plugin_helper/socket.rb', line 41 def socket_create(proto, host, port, **kwargs, &block) case proto when :tcp socket_create_tcp(host, port, **kwargs, &block) when :udp socket_create_udp(host, port, **kwargs, &block) when :tls socket_create_tls(host, port, **kwargs, &block) when :unix raise "not implemented yet" else raise ArgumentError, "invalid protocol: #{proto}" end end |