kCFSocketLeaveErrors
Declaration
var kCFSocketLeaveErrors: CFOptionFlags { get }Discussion
Normally, the CFNetwork stack calls getsockopt(2) macOS Developer Tools Manual Page to read the error code from the socket prior to calling your write callback. This also has the effect of clearing any pending errors on the socket.
If this flag is set, this call is skipped so that you can check for specific socket errors in your write callback.