<!--
{
  "availability" : [
    "iOS: 2.0.0 - 27.0.0",
    "iPadOS: 2.0.0 - 27.0.0",
    "macCatalyst: 13.1.0 - 27.0.0",
    "macOS: 10.4.0 - 27.0.0",
    "tvOS: 9.0.0 - 27.0.0",
    "visionOS: 1.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "CFNetwork",
  "identifier" : "/documentation/CFNetwork/CFNetServiceMonitorStart(_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "CFNetwork"
    ],
    "preciseIdentifier" : "c:@F@CFNetServiceMonitorStart"
  },
  "title" : "CFNetServiceMonitorStart(_:_:_:)"
}
-->

# CFNetServiceMonitorStart(_:_:_:)

Starts monitoring.

```
func CFNetServiceMonitorStart(_ monitor: CFNetServiceMonitor, _ recordType: CFNetServiceMonitorType, _ error: UnsafeMutablePointer<CFStreamError>?) -> Bool
```

## Parameters

`monitor`

CFNetServiceMonitor, created by calling [`CFNetServiceMonitorCreate(_:_:_:_:)`](/documentation/CFNetwork/CFNetServiceMonitorCreate(_:_:_:_:)), that is to be started.

`recordType`

CFNetServiceMonitorType that specified the type of record to monitor. For possible values, see [`CFNetServiceMonitorType`](/documentation/CFNetwork/CFNetServiceMonitorType).

`error`

Pointer to a <doc://com.apple.documentation/documentation/CoreFoundation/CFStreamError> structure. If an error occurs, on output, the structure’s `domain` field will be set to the error code’s domain and the `error` field will be set to an appropriate error code. Set this parameter to `NULL` if you don’t want to receive the error code and its domain.

## Return Value

`TRUE` if an asynchronous monitor was started successfully. `FALSE` if an error occurred when starting an asynchronous or synchronous monitor, or if [`CFNetServiceMonitorStop(_:_:)`](/documentation/CFNetwork/CFNetServiceMonitorStop(_:_:)) was called for an synchronous monitor.

## Discussion

This function starts monitoring for changes to records of the type specified by `recordType`. If a monitor is already running for the service associated with the specified CFNetServiceMonitorRef, this function returns `FALSE`.

For synchronous monitors, this function blocks until the monitor is stopped by calling [`CFNetServiceMonitorStop(_:_:)`](/documentation/CFNetwork/CFNetServiceMonitorStop(_:_:)), in which case, this function returns `FALSE`.

For asynchronous monitors, this function returns `TRUE` or `FALSE`, depending on whether monitoring starts successfully.

### Special Considerations

This function is thread safe.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)