CFNetServiceMonitorStop(_:_:)
Stops a CFNetServiceMonitor.
Declaration
func CFNetServiceMonitorStop(_ monitor: CFNetServiceMonitor, _ error: UnsafeMutablePointer<CFStreamError>?)Parameters
- monitor:
CFNetServiceMonitor, started by calling Cfnetservicemonitorstart(_:_:_:), that is to be stopped.
- error:
Pointer to a doc://com.apple.documentation/documentation/corefoundation/cfstreamerror structure or
NULL. For synchronous monitors, set theerrorfield of this structure to the non-zero value you want to be set in theCFStreamErrorstructure when Cfnetservicemonitorstart(_:_:_:) returns. Note that when it returns, Cfnetservicemonitorstart(_:_:_:) returnsFALSE.If the monitor was started asynchronously, set theerrorfield to the non-zero value you want the monitor’s callback to receive when it is called. If this parameter isNULL, default values for theCFStreamErrorstructure are used: the domain is set tokCFStreamErrorDomainNetServicesand the error code is set tokCFNetServicesErrorCancel.
Discussion
This function stops the specified monitor. Call CFNetServiceMonitorStart(_:_:_:) if you want to start monitoring again.
If you want to stop monitoring and no longer need to monitor record changes, call CFNetServiceMonitorInvalidate(_:) instead of this function.
Special Considerations
This function is thread safe.
See Also
Network Services
CFNetServiceCFNetServiceBrowserCFNetServiceBrowserFlagsCFNetServiceMonitorCFNetServiceMonitorTypeCFNetServiceClientContextCFNetServiceRegisterFlagsCFNetServicesErrorCFNetServiceBrowserInvalidate(_:)CFNetServiceBrowserScheduleWithRunLoop(_:_:_:)CFNetServiceBrowserCreate(_:_:_:)CFNetServiceBrowserGetTypeID()CFNetServiceBrowserSearchForDomains(_:_:_:)CFNetServiceBrowserSearchForServices(_:_:_:_:)CFNetServiceBrowserStopSearch(_:_:)