Sha256: 89ac12c5a6e062b133b75daa2a0e004e0e9eb15b573220518cf9db6705f2bf80
Contents?: true
Size: 1.24 KB
Versions: 16
Compression:
Stored size: 1.24 KB
Contents
# # Fluentd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # require 'fluent/plugin/socket_util' module Fluent class UdpInput < SocketUtil::BaseInput Plugin.register_input('udp', self) config_set_default :port, 5160 config_param :body_size_limit, :size, default: 4096 def listen(callback) log.info "listening udp socket on #{@bind}:#{@port}" socket_manager_path = ENV['SERVERENGINE_SOCKETMANAGER_PATH'] if Fluent.windows? socket_manager_path = socket_manager_path.to_i end client = ServerEngine::SocketManager::Client.new(socket_manager_path) @usock = client.listen_udp(@bind, @port) SocketUtil::UdpHandler.new(@usock, log, @body_size_limit, callback) end end end
Version data entries
16 entries across 16 versions & 1 rubygems