You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: dap_utils.rb
    path of file: ./repos/debug/test/support
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module DEBUGGER__
  module DAP_TestUtils
    class RetryBecauseCantRead < Exception
    end

    def recv_request sock, backlog
      case sock.gets
      when /Content-Length: (\d+)/
        b = sock.read(2)
        rais
    
    def connect_to_dap_server test_info
      remote_info = test_info.remote_info
      sock = Socket.unix remote_info.sock_path
      test_info.reader_thread = Thread.new(sock, test_info) do |s, info|
        while res = recv_request(s, info.backlog)
          info.res_backlog << res
        end
      rescue Detach
      end