Search Results for

    Show / Hide Table of Contents

    Class MacHttp3NativeArch

    Detects when a Mac app-local libmsquic.dylib was built for a different CPU than this process.

    Inheritance
    object
    MacHttp3NativeArch
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Titanium.Web.Proxy.Http3
    Assembly: Titanium.Web.Proxy.dll
    Syntax
    public static class MacHttp3NativeArch

    Fields

    | Edit this page View Source

    CpuTypeArm64

    Mach-O CPU_TYPE_ARM64.

    Declaration
    public const int CpuTypeArm64 = 16777228
    Field Value
    Type Description
    int
    | Edit this page View Source

    CpuTypeX64

    Mach-O CPU_TYPE_X86_64.

    Declaration
    public const int CpuTypeX64 = 16777223
    Field Value
    Type Description
    int

    Methods

    | Edit this page View Source

    DetectMismatch(string?, Architecture?, bool?)

    When app-local libmsquic.dylib exists and its CPU does not match this process, returns the mismatch kind. Otherwise None.

    Declaration
    public static MacHttp3NativeMismatchKind DetectMismatch(string? baseDirectory = null, Architecture? processArchitecture = null, bool? processTranslated = null)
    Parameters
    Type Name Description
    string baseDirectory

    Directory that should contain libmsquic.dylib. Defaults to BaseDirectory.

    Architecture? processArchitecture

    Process architecture under test. Defaults to ProcessArchitecture.

    bool? processTranslated

    When set, overrides the live sysctl.proc_translated probe (unit tests).

    Returns
    Type Description
    MacHttp3NativeMismatchKind
    | Edit this page View Source

    IsProcessTranslated()

    True when this Intel process is running under Rosetta on Apple silicon.

    Declaration
    public static bool IsProcessTranslated()
    Returns
    Type Description
    bool
    | Edit this page View Source

    MatchesProcessArchitecture(int, Architecture)

    True when the dylib CPU matches the given process architecture.

    Declaration
    public static bool MatchesProcessArchitecture(int dylibCpuType, Architecture processArchitecture)
    Parameters
    Type Name Description
    int dylibCpuType
    Architecture processArchitecture
    Returns
    Type Description
    bool
    | Edit this page View Source

    TryReadCpuType(ReadOnlySpan<byte>, out int)

    Reads the CPU type from the first eight bytes of a thin Mach-O image. Fat binaries are rejected (return false) so callers can fail the package build.

    Declaration
    public static bool TryReadCpuType(ReadOnlySpan<byte> header, out int cpuType)
    Parameters
    Type Name Description
    ReadOnlySpan<byte> header
    int cpuType
    Returns
    Type Description
    bool
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX