Invalidates a CFSocket object, stopping it from sending or receiving any more messages.
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Core Foundation
The CFSocket object to invalidate.
You should always invalidate a socket object when you are through using it. Invalidating a CFSocket object prevents the object from sending or receiving any more messages, but does not release the socket object itself.
If a run loop source was created for
s, the run loop source is invalidated.
If a release callback was specified in
CFSocket object, this function calls it to release the object in the
info field (which was provided when
s was created).
By default, this call closes the underlying socket. If you have explicitly cleared the
k flag by calling
CFSocket, you must close the socket yourself after calling this function.