---
title: connectCallBack
framework: corefoundation
role: symbol
role_heading: Type Property
path: corefoundation/cfsocketcallbacktype/connectcallback
---

# connectCallBack

## Declaration

```swift
static var connectCallBack: CFSocketCallBackType { get }
```

## Discussion

Discussion If a connection attempt is made in the background by calling CFSocketConnectToAddress(_:_:_:) or CFSocketCreateConnectedToSocketSignature(_:_:_:_:_:_:) with a negative timeout value, this callback type is made when the connect finishes. In this case the data argument is either NULL or a pointer to an SInt32 error code, if the connect failed. This callback will never be sent more than once for a given socket.

## See Also

### Constants

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