Sha256: 5971ec518a0947c6cc0beb4aabf2ff74b77d592c8eea824080731edd2da8ef4f
Contents?: true
Size: 982 Bytes
Versions: 20
Compression:
Stored size: 982 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 # This class allows us to create a TCP Socket to communicate to the Service (Speed Racer). Either it or the Unix # Socket will be used, as determined by the configuration options set for Service communication. class TcpSocket include Contrast::Api::Communication::Socket attr_reader :host, :port # Create the socket # # @param host [String] socket target hostname or IP address # @param port [String,Integer] socket target port def initialize host, port @host = host.to_s @port = port.to_i end # @return [::TCPSocket] def new_socket ::TCPSocket.new(host, port) end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems