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 495
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 500
def remote_addr
  @peeraddr[3]
end
remote_host() click to toggle source
# File lib/fluent/plugin_helper/server.rb, line 504
def remote_host
  @peeraddr[2]
end
remote_port() click to toggle source
# File lib/fluent/plugin_helper/server.rb, line 508
def remote_port
  @peeraddr[1]
end
write(data) click to toggle source
# File lib/fluent/plugin_helper/server.rb, line 512
def write(data)
  @sock.send(data, 0, @peeraddr[3], @peeraddr[1])
end