Function

CFNetDiagnosticCreateWithURL

Creates a CFNetDiagnosticRef from a CFURLRef.

Declaration

CFNetDiagnosticRef CFNetDiagnosticCreateWithURL(CFAllocatorRef alloc, CFURLRef url);

Parameters

alloc

The allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.

url

CFURLRef that refers to the failed connection.

Return Value

CFNetDiagnosticRef that you can pass to CFNetDiagnosticDiagnoseProblemInteractively or CFNetDiagnosticCopyNetworkStatusPassively. Ownership follows the The Create Rule.

Discussion

This function uses a URL to create a reference to an instance of a CFNetDiagnostic object. You can pass the reference to CFNetDiagnosticDiagnoseProblemInteractively to open a Network Diagnostics window or to CFNetDiagnosticCopyNetworkStatusPassively to get a description of the connection referenced by readStream and writeStream.

Special Considerations

This function is thread safe as long as another thread does not alter the same CFNetDiagnosticRef at the same time.

See Also

Network Diagnostics

CFNetDiagnosticRef

An opaque reference representing a CFNetDiagnostic.

CFNetDiagnosticStatusValues

Constants for diagnostic status values.

Deprecated
CFNetDiagnosticCopyNetworkStatusPassively

Gets a network status value.

Deprecated
CFNetDiagnosticCreateWithStreams

Creates a network diagnostic object from a pair of CFStreams.

Deprecated
CFNetDiagnosticDiagnoseProblemInteractively

Opens a Network Diagnostics window.

Deprecated
CFNetDiagnosticSetName

Overrides the displayed application name.

Deprecated