Sha256: a44537956056b7578aab540e14aca9c72c07c8703806b094a65bd768aeec2fb4

Contents?: true

Size: 584 Bytes

Versions: 12

Compression:

Stored size: 584 Bytes

Contents

require 'socket'

require 'raven/transports'
require 'raven/error'

module Raven

  module Transports

    class UDP < Transport

      def send(auth_header, data, options = {})
        conn.send "#{auth_header}\n\n#{data}", 0
      end

    private

      def conn
        @conn ||= begin
          sock = UDPSocket.new
          sock.connect(self.configuration.host, self.configuration.port)
          sock
        end
      end

      def verify_configuration
        super
        raise Error.new('No port specified') unless self.configuration.port
      end

    end

  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
sentry-raven-0.6.1 lib/raven/transports/udp.rb
sentry-raven-0.7.1 lib/raven/transports/udp.rb
sentry-raven-0.6.0 lib/raven/transports/udp.rb
sentry-raven-0.5.0 lib/raven/transports/udp.rb
sentry-raven-0.4.8 lib/raven/transports/udp.rb
sentry-raven-0.4.7 lib/raven/transports/udp.rb
sentry-raven-0.4.6 lib/raven/transports/udp.rb
sentry-raven-0.4.5 lib/raven/transports/udp.rb
sentry-raven-0.4.4 lib/raven/transports/udp.rb
sentry-raven-0.4.3 lib/raven/transports/udp.rb
sentry-raven-0.4.2 lib/raven/transports/udp.rb
sentry-raven-0.4.1 lib/raven/transports/udp.rb