Opens a connection to a remote socket.
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Core Foundation
The CFSocket object with which to connect to
A CFData object containing a
struct sockaddrappropriate for the protocol family of
struct sockaddr, for example), indicating the remote address to which to connect. This data object is used only for the duration of the function call.
The time to wait for a connection to succeed. If a negative value is used, this function does not wait for the connection and instead lets the connection attempt happen in the background. If
k, you will receive a callback when the background connection succeeds or fails.
CFSocket Connect Call Back
An error code indicating success or failure of the connection attempt.