Sha256: 2be151b71bf7daa8eed6805b0a8c7585f9f231d817d5a83b3d12f28fe3a58446

Contents?: true

Size: 375 Bytes

Versions: 2

Compression:

Stored size: 375 Bytes

Contents

require 'socket'
require 'syslog_protocol_ms'
require 'remote_syslog_sender_ms/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_ms-1.3.2 lib/remote_syslog_sender_ms/udp_sender.rb
remote_syslog_sender_ms-1.3.0 lib/remote_syslog_sender_ms/udp_sender.rb