class HTTP::Timeout::Null

def connect(socket_class, host, port)

Connects to a socket
def connect(socket_class, host, port)
  @socket = socket_class.open(host, port)
end

def connect_ssl

Starts a SSL connection on a socket
def connect_ssl
  @socket.connect
end

def initialize(options = {})

def initialize(options = {})
  @options = options
end

def readpartial(size)

Read from the socket
def readpartial(size)
  @socket.readpartial(size)
end

def start_tls(host, ssl_socket_class, ssl_context)

Configures the SSL connection and starts the connection
def start_tls(host, ssl_socket_class, ssl_context)
  @socket = ssl_socket_class.new(socket, ssl_context)
  @socket.sync_close = true if @socket.respond_to? :sync_close=
  connect_ssl
  return unless ssl_context.verify_mode == OpenSSL::SSL::VERIFY_PEER
  @socket.post_connection_check(host)
end

def write(data)

Write to the socket
def write(data)
  @socket << data
end