Sha256: 5bc020628eb7f62bfc3900fbd8b58725e10caea0252e4d2d8a51a6468da1fc80

Contents?: true

Size: 369 Bytes

Versions: 13

Compression:

Stored size: 369 Bytes

Contents

require 'socket'
require 'syslog_protocol'
require 'remote_syslog_sender/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

13 entries across 13 versions & 5 rubygems

Version Path
remote_syslog_sender-1.2.2 lib/remote_syslog_sender/udp_sender.rb
remote_syslog_sender_multiline-1.2.2 lib/remote_syslog_sender/udp_sender.rb
remote_syslog_sender_multiline-1.2.1 lib/remote_syslog_sender/udp_sender.rb
remote_syslog_sender_criteo-1.2.1 lib/remote_syslog_sender/udp_sender.rb
remote_syslog_sender_barthv-1.2.1 lib/remote_syslog_sender/udp_sender.rb
remote_syslog_sender_tls-1.2.5 lib/remote_syslog_sender/udp_sender.rb
remote_syslog_sender-1.2.1 lib/remote_syslog_sender/udp_sender.rb
remote_syslog_sender-1.2.0 lib/remote_syslog_sender/udp_sender.rb
remote_syslog_sender-1.1.4 lib/remote_syslog_sender/udp_sender.rb
remote_syslog_sender-1.1.3 lib/remote_syslog_sender/udp_sender.rb
remote_syslog_sender-1.1.2 lib/remote_syslog_sender/udp_sender.rb
remote_syslog_sender-1.1.1 lib/remote_syslog_sender/udp_sender.rb
remote_syslog_sender-1.1.0 lib/remote_syslog_sender/udp_sender.rb