Sha256: 4979cdb0e0f3b505681469a81a4379b82ce6f0200a03a6be7b25c97f18854e10

Contents?: true

Size: 579 Bytes

Versions: 13

Compression:

Stored size: 579 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

13 entries across 13 versions & 2 rubygems

Version Path
sentry-raven-0.12.2 lib/raven/transports/udp.rb
sentry-raven-0.12.1 lib/raven/transports/udp.rb
sentry-raven-0.12.0 lib/raven/transports/udp.rb
mustwin-sentry-raven-0.11.2 lib/raven/transports/udp.rb
sentry-raven-0.11.2 lib/raven/transports/udp.rb
sentry-raven-0.11.1 lib/raven/transports/udp.rb
sentry-raven-0.10.1 lib/raven/transports/udp.rb
sentry-raven-0.9.4 lib/raven/transports/udp.rb
sentry-raven-0.9.3 lib/raven/transports/udp.rb
sentry-raven-0.9.2 lib/raven/transports/udp.rb
sentry-raven-0.9.1 lib/raven/transports/udp.rb
sentry-raven-0.9.0 lib/raven/transports/udp.rb
sentry-raven-0.8.0 lib/raven/transports/udp.rb