Sha256: 63a17915d0c2c8061e2632f9719d22f5c720586d198df19b0721a17b63fa1eef

Contents?: true

Size: 516 Bytes

Versions: 12

Compression:

Stored size: 516 Bytes

Contents

require 'fluent/plugin/socket_util'

module Fluent
  class TcpInput < SocketUtil::BaseInput
    Plugin.register_input('tcp', self)

    config_set_default :port, 5170
    config_param :delimiter, :string, :default => "\n" # syslog family add "\n" to each message and this seems only way to split messages in tcp stream

    def listen(callback)
      log.debug "listening tcp socket on #{@bind}:#{@port}"
      Coolio::TCPServer.new(@bind, @port, SocketUtil::TcpHandler, log, @delimiter, callback)
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
fluentd-0.10.62 lib/fluent/plugin/in_tcp.rb
fluentd-0.10.61 lib/fluent/plugin/in_tcp.rb
fluentd-0.10.60 lib/fluent/plugin/in_tcp.rb
fluentd-0.10.59 lib/fluent/plugin/in_tcp.rb
fluentd-0.10.58 lib/fluent/plugin/in_tcp.rb
fluentd-0.10.57 lib/fluent/plugin/in_tcp.rb
fluentd-0.10.56 lib/fluent/plugin/in_tcp.rb
fluentd-0.10.55 lib/fluent/plugin/in_tcp.rb
fluentd-0.10.54 lib/fluent/plugin/in_tcp.rb
fluentd-0.10.53 lib/fluent/plugin/in_tcp.rb
fluentd-0.10.52 lib/fluent/plugin/in_tcp.rb
fluentd-0.10.51 lib/fluent/plugin/in_tcp.rb