---
title: CFNetServiceBrowserClientCallBack
framework: cfnetwork
role: symbol
role_heading: Type Alias
path: cfnetwork/cfnetservicebrowserclientcallback
---

# CFNetServiceBrowserClientCallBack

Defines a pointer to the callback function for a CFNetServiceBrowser.

## Declaration

```swift
typealias CFNetServiceBrowserClientCallBack = (CFNetServiceBrowser, CFOptionFlags, CFTypeRef?, UnsafeMutablePointer<CFStreamError>?, UnsafeMutableRawPointer?) -> Void
```

## Parameters

- `browser`: The CFNetServiceBrowser associated with this callback function.
- `flags`: Flags conveying additional information. The kCFNetServiceFlagIsDomain bit is set if domainOrService contains a domain; if this bit is not set, domainOrService contains a CFNetService instance. For additional bit values, see CFNetServiceBrowserClientCallBack Bit Flags.
- `domainOrService`: A string containing a domain name if this callback function is being called as a result of calling doc://com.apple.cfnetwork/documentation/CFNetwork/CFNetServiceBrowserSearchForDomains(_:_:_:), or a CFNetService instance if this callback function is being called as a result calling doc://com.apple.cfnetwork/documentation/CFNetwork/CFNetServiceBrowserSearchForServices(_:_:_:_:).
- `error`: A pointer to a doc://com.apple.documentation/documentation/CoreFoundation/CFStreamError structure whose error field may contain an error code.
- `info`: User-defined context information. The value of info is the same as the value of the info field of the doc://com.apple.cfnetwork/documentation/CFNetwork/CFNetServiceClientContext structure that was provided when doc://com.apple.cfnetwork/documentation/CFNetwork/CFNetServiceBrowserCreate(_:_:_:) was called to create the CFNetServiceBrowser associated with this callback function.

## Discussion

Discussion If you name your callback MyNetServiceBrowserClientCallBack, you would declare it like this: Discussion The callback function for a CFNetServiceBrowser is called one or more times when domains or services are found as the result of calling CFNetServiceBrowserSearchForDomains(_:_:_:) and CFNetServiceBrowserSearchForServices(_:_:_:_:).

## See Also

### Data Types

- [CFHostClientCallBack](cfnetwork/cfhostclientcallback.md)
- [CFNetServiceClientCallBack](cfnetwork/cfnetserviceclientcallback.md)
- [CFNetServiceMonitorClientCallBack](cfnetwork/cfnetservicemonitorclientcallback.md)
- [CFNetDiagnosticStatus](cfnetwork/cfnetdiagnosticstatus.md)
