Class MacHttp3NativeArch
Detects when a Mac app-local libmsquic.dylib was built for a different CPU than this process.
Inherited Members
Namespace: Titanium.Web.Proxy.Http3
Assembly: Titanium.Web.Proxy.dll
Syntax
public static class MacHttp3NativeArch
Fields
| Edit this page View SourceCpuTypeArm64
Mach-O CPU_TYPE_ARM64.
Declaration
public const int CpuTypeArm64 = 16777228
Field Value
| Type | Description |
|---|---|
| int |
CpuTypeX64
Mach-O CPU_TYPE_X86_64.
Declaration
public const int CpuTypeX64 = 16777223
Field Value
| Type | Description |
|---|---|
| int |
Methods
| Edit this page View SourceDetectMismatch(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 |
| Architecture? | processArchitecture | Process architecture under test. Defaults to ProcessArchitecture. |
| bool? | processTranslated | When set, overrides the live |
Returns
| Type | Description |
|---|---|
| MacHttp3NativeMismatchKind |
IsProcessTranslated()
True when this Intel process is running under Rosetta on Apple silicon.
Declaration
public static bool IsProcessTranslated()
Returns
| Type | Description |
|---|---|
| bool |
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 |
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 |