Sha256: c1decfb2e366ab7bbe50d78c21e6954b23e855e0abb666cb29c1cb91615f0027

Contents?: true

Size: 716 Bytes

Versions: 20

Compression:

Stored size: 716 Bytes

Contents

# Copyright (c) 2022 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
# frozen_string_literal: true

require 'contrast/api/communication/socket'

module Contrast
  module Api
    module Communication
      # Implements a UNIX domain socket to connect to the Contrast Service.
      class UnixSocket
        include Contrast::Api::Communication::Socket

        attr_reader :path

        # Create the socket
        # @param path [String] file path to a UNIX domain socket
        def initialize path
          @path = path
        end

        # @return [::UNIXSocket]
        def new_socket
          ::UNIXSocket.new(path)
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
contrast-agent-6.7.0 lib/contrast/api/communication/unix_socket.rb
contrast-agent-6.6.5 lib/contrast/api/communication/unix_socket.rb
contrast-agent-6.6.4 lib/contrast/api/communication/unix_socket.rb
contrast-agent-6.6.3 lib/contrast/api/communication/unix_socket.rb
contrast-agent-6.6.2 lib/contrast/api/communication/unix_socket.rb
contrast-agent-6.6.1 lib/contrast/api/communication/unix_socket.rb
contrast-agent-6.6.0 lib/contrast/api/communication/unix_socket.rb
contrast-agent-6.5.1 lib/contrast/api/communication/unix_socket.rb
contrast-agent-6.5.0 lib/contrast/api/communication/unix_socket.rb
contrast-agent-6.4.0 lib/contrast/api/communication/unix_socket.rb
contrast-agent-6.3.0 lib/contrast/api/communication/unix_socket.rb
contrast-agent-6.2.0 lib/contrast/api/communication/unix_socket.rb
contrast-agent-6.1.2 lib/contrast/api/communication/unix_socket.rb
contrast-agent-6.1.1 lib/contrast/api/communication/unix_socket.rb
contrast-agent-6.1.0 lib/contrast/api/communication/unix_socket.rb
contrast-agent-6.0.0 lib/contrast/api/communication/unix_socket.rb
contrast-agent-5.3.0 lib/contrast/api/communication/unix_socket.rb
contrast-agent-5.2.0 lib/contrast/api/communication/unix_socket.rb
contrast-agent-5.1.0 lib/contrast/api/communication/unix_socket.rb
contrast-agent-5.0.0 lib/contrast/api/communication/unix_socket.rb