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.
Declaration
func CFHostSetClient(_ theHost: CFHost, _ clientCB: CFHostClientCallBack?, _ clientContext: UnsafeMutablePointer<CFHostClientContext>?) -> BoolParameters
- theHost:
The host to modify. The value must not be
NULL. - clientCB:
The callback function to associate with
theHost. The callback function will be called when a resolution completes or is cancelled. If you are calling this function to disassociate a client context and callback fromtheHost, pclientCBassNULL. - clientContext:
A Cfhostclientcontext structure whose
infofield will be passed to the callback function specified byclientCBwhenclientCBis called. This value must not beNULLwhen setting an association.Pass
NULLwhen disassociating a client context and a callback from a host.
Return Value
TRUE if the association could be set or unset, otherwise FALSE.
Discussion
The callback function specified by clientCB will be called when a resolution completes or is cancelled.
Special Considerations
This function is thread safe.
See Also
Hosts
CFHostCFHostInfoTypeCFHostClientContextCFHostCancelInfoResolution(_:_:)CFHostCreateCopy(_:_:)CFHostCreateWithAddress(_:_:)CFHostCreateWithName(_:_:)CFHostGetAddressing(_:_:)CFHostGetNames(_:_:)CFHostGetReachability(_:_:)CFHostGetTypeID()CFHostScheduleWithRunLoop(_:_:_:)CFHostStartInfoResolution(_:_:_:)CFHostUnscheduleFromRunLoop(_:_:_:)