CFNetServiceMonitorClientCallBack
Defines a pointer to the callback function that is to be called when a monitored record type changes.
Declaration
typealias CFNetServiceMonitorClientCallBack = (CFNetServiceMonitor, CFNetService?, CFNetServiceMonitorType, CFData?, UnsafeMutablePointer<CFStreamError>?, UnsafeMutableRawPointer?) -> VoidParameters
- theMonitor:
CFNetServiceMonitor for which the callback is being called.
- theService:
CFNetService for which the callback is being called.
- typeInfo:
Type of record that changed. For possible values, see Cfnetservicemonitortype.
- rdata:
Contents of the record that changed.
- error:
Pointer to doc://com.apple.documentation/documentation/corefoundation/cfstreamerror structure whose
errorfield contains an error code if an error occurred. - info:
Arbitrary pointer to the user-defined data that was specified in the
infofield of theCFNetServiceClientContextstructure when the monitor was created by Cfnetservicemonitorcreate(_:_:_:_:).
Discussion
If you name your callback MyNetServiceMonitorClientCallBack, you would declare it like this:
Discussion
The callback function will be called when the monitored record type changes or when the monitor is stopped by calling CFNetServiceMonitorStop(_:_:).