---
title: "CFSocketGetSocketFlags(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfsocketgetsocketflags(_:)"
---

# CFSocketGetSocketFlags(_:)

Returns flags that control certain behaviors of a CFSocket object.

## Declaration

```swift
func CFSocketGetSocketFlags(_ s: CFSocket!) -> CFOptionFlags
```

## Parameters

- `s`: The CFSocket to examine.

## Return Value

Return Value A bitwise-OR combination of flags controlling the behavior of s. See CFSocket Flags for the list of available flags.

## Discussion

Discussion See CFSocketSetSocketFlags(_:_:) for details on what the flags of a CFSocket mean.

## See Also

### Configuring Sockets

- [CFSocketCopyAddress(_:)](corefoundation/cfsocketcopyaddress(_:).md)
- [CFSocketCopyPeerAddress(_:)](corefoundation/cfsocketcopypeeraddress(_:).md)
- [CFSocketDisableCallBacks(_:_:)](corefoundation/cfsocketdisablecallbacks(_:_:).md)
- [CFSocketEnableCallBacks(_:_:)](corefoundation/cfsocketenablecallbacks(_:_:).md)
- [CFSocketGetContext(_:_:)](corefoundation/cfsocketgetcontext(_:_:).md)
- [CFSocketGetNative(_:)](corefoundation/cfsocketgetnative(_:).md)
- [CFSocketSetAddress(_:_:)](corefoundation/cfsocketsetaddress(_:_:).md)
- [CFSocketSetSocketFlags(_:_:)](corefoundation/cfsocketsetsocketflags(_:_:).md)
