class Fluent::PluginHelper::Server::UDPCallbackSocket

Constants

ENABLED_EVENTS

Public Class Methods

new(sock, peeraddr, **kwargs) click to toggle source
# File lib/fluent/plugin_helper/server.rb, line 476
def initialize(sock, peeraddr, **kwargs)
  super("udp", sock, ENABLED_EVENTS, **kwargs)
  @peeraddr = peeraddr
end

Public Instance Methods

remote_addr() click to toggle source
# File lib/fluent/plugin_helper/server.rb, line 481
def remote_addr
  @peeraddr[3]
end
remote_host() click to toggle source
# File lib/fluent/plugin_helper/server.rb, line 485
def remote_host
  @peeraddr[2]
end
remote_port() click to toggle source
# File lib/fluent/plugin_helper/server.rb, line 489
def remote_port
  @peeraddr[1]
end
write(data) click to toggle source
# File lib/fluent/plugin_helper/server.rb, line 493
def write(data)
  @sock.send(data, 0, @peeraddr[3], @peeraddr[1])
end