module DEBUGGER__::UI_DAP

def send **kw

def send **kw
  if sock = @sock
    kw[:seq] = @seq += 1
    str = JSON.dump(kw)
    @send_lock.synchronize do
      sock.write "Content-Length: #{str.bytesize}\r\n\r\n#{str}"
    end
    show_protocol '<', str
  end
rescue Errno::EPIPE => e
  $stderr.puts "#{e.inspect} rescued during sending message"
end