Function

CFHostStartInfoResolution

Starts resolution for a host object.

Declaration

Boolean CFHostStartInfoResolution(CFHostRef theHost, CFHostInfoType info, CFStreamError *error);

Parameters

theHost

The host, obtained by previously calling CFHostCreateCopy, CFHostCreateWithAddress, or CFHostCreateWithName, that is to be resolved. This value must not be NULL.

info

A value of type CFHostInfoType specifying the type of information that is to be retrieved. See CFHostInfoType for possible values.

error

A pointer to a CFStreamError structure, that, if an error occurs, is set to the error and the error’s domain. In synchronous mode, the error indicates why resolution failed, and in asynchronous mode, the error indicates why resolution failed to start.

Return Value

TRUE if the resolution was started (asynchronous mode); FALSE if another resolution is already in progress for theHost or if an error occurred.

Discussion

This function retrieves the information specified by info and stores it in the host.

In synchronous mode, this function blocks until the resolution has completed, in which case this function returns TRUE, until the resolution is stopped by calling CFHostCancelInfoResolution from another thread, in which case this function returns FALSE, or until an error occurs.

Special Considerations

This function is thread safe.

See Also

Hosts

CFHostRef

An opaque reference representing an CFHost object.

CFHostInfoType

Values indicating the type of data that is to be resolved or the type of data that was resolved.

CFHostClientContext

A structure containing user-defined data and callbacks for CFHost objects.

CFHostCancelInfoResolution

Cancels the resolution of a host.

CFHostCreateCopy

Creates a new host object by copying.

CFHostCreateWithAddress

Uses an address to create an instance of a host object.

CFHostCreateWithName

Uses a name to create an instance of a host object.

CFHostGetAddressing

Gets the addresses from a host.

CFHostGetNames

Gets the names from a CFHost.

CFHostGetReachability

Gets reachability information from a host.

CFHostGetTypeID

Gets the Core Foundation type identifier for the CFHost opaque type.

CFHostScheduleWithRunLoop

Schedules a CFHost on a run loop.

CFHostSetClient

Associates a client context and a callback function with a CFHost object or disassociates a client context and callback function that were previously set.

CFHostUnscheduleFromRunLoop

Unschedules a CFHost from a run loop.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software