---
title: CFNetServiceMonitorClientCallBack
framework: cfnetwork
role: symbol
role_heading: Type Alias
path: cfnetwork/cfnetservicemonitorclientcallback
---

# CFNetServiceMonitorClientCallBack

Defines a pointer to the callback function that is to be called when a monitored record type changes.

## Declaration

```swift
typealias CFNetServiceMonitorClientCallBack = (CFNetServiceMonitor, CFNetService?, CFNetServiceMonitorType, CFData?, UnsafeMutablePointer<CFStreamError>?, UnsafeMutableRawPointer?) -> Void
```

## Parameters

- `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 doc://com.apple.cfnetwork/documentation/CFNetwork/CFNetServiceMonitorType.
- `rdata`: Contents of the record that changed.
- `error`: Pointer to doc://com.apple.documentation/documentation/CoreFoundation/CFStreamError structure whose error field contains an error code if an error occurred.
- `info`: Arbitrary pointer to the user-defined data that was specified in the info field of the CFNetServiceClientContext structure when the monitor was created by doc://com.apple.cfnetwork/documentation/CFNetwork/CFNetServiceMonitorCreate(_:_:_:_:).

## Discussion

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(_:_:).

## See Also

### Data Types

- [CFHostClientCallBack](cfnetwork/cfhostclientcallback.md)
- [CFNetServiceBrowserClientCallBack](cfnetwork/cfnetservicebrowserclientcallback.md)
- [CFNetServiceClientCallBack](cfnetwork/cfnetserviceclientcallback.md)
- [CFNetDiagnosticStatus](cfnetwork/cfnetdiagnosticstatus.md)
