---
title: CFSocketCallBackType
framework: corefoundation
role: symbol
role_heading: Structure
path: corefoundation/cfsocketcallbacktype
---

# CFSocketCallBackType

Types of socket activity that can cause the callback function of a CFSocket object to be called.

## Declaration

```swift
struct CFSocketCallBackType
```

## Overview

Overview The callback types for which a callback is made is determined when the CFSocket object is created, such as with CFSocketCreate(_:_:_:_:_:_:_:), or later with CFSocketEnableCallBacks(_:_:) and CFSocketDisableCallBacks(_:_:). The kCFSocketReadCallBack, kCFSocketAcceptCallBack, and kCFSocketDataCallBack callbacks are mutually exclusive. Version-Notes kCFSocketWriteCallBack is available in macOS 10.2 and later.

## Topics

### Constants

- [readCallBack](corefoundation/cfsocketcallbacktype/readcallback.md)
- [acceptCallBack](corefoundation/cfsocketcallbacktype/acceptcallback.md)
- [dataCallBack](corefoundation/cfsocketcallbacktype/datacallback.md)
- [connectCallBack](corefoundation/cfsocketcallbacktype/connectcallback.md)
- [writeCallBack](corefoundation/cfsocketcallbacktype/writecallback.md)

### Initializers

- [init(rawValue:)](corefoundation/cfsocketcallbacktype/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [ExpressibleByArrayLiteral](swift/expressiblebyarrayliteral.md)
- [OptionSet](swift/optionset.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [SetAlgebra](swift/setalgebra.md)

## See Also

### Constants

- [CFSocket Flags](corefoundation/1560944-cfsocket-flags.md)
- [CFSocketError](corefoundation/cfsocketerror.md)
