Sha256: 0a19267a8caa04a6154fb0a14448df4f06878b1f112adba84738a588bbccc766

Contents?: true

Size: 379 Bytes

Versions: 2

Compression:

Stored size: 379 Bytes

Contents

require 'socket'
require 'syslog_protocol'
require 'remote_syslog_sender_multiline/sender'

module RemoteSyslogSender
  class UdpSender < Sender
    def initialize(remote_hostname, remote_port, options = {})
      super
      @socket = UDPSocket.new
    end

    private

    def send_msg(payload)
      @socket.send(payload, 0, @remote_hostname, @remote_port)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
remote_syslog_sender_multiline-1.2.4 lib/remote_syslog_sender_multiline/udp_sender.rb
remote_syslog_sender_multiline-1.2.3 lib/remote_syslog_sender_multiline/udp_sender.rb