CFSocketStreamSOCKSGetError(_:)
This function gets error codes in the kCFStreamErrorDomainSOCKS domain from the CFStreamError returned by a stream operation.
Declaration
func CFSocketStreamSOCKSGetError(_ error: UnsafePointer<CFStreamError>) -> Int32Parameters
- error:
The error value to decode.
Discussion
Error codes in the kCFStreamErrorDomainSOCKS domain can come from multiple parts of the protocol stack, many of which define their own error values as part of outside specifications such as the HTTP specification.
To avoid confusion from conflicting error numbers, error codes in the kCFStreamErrorDomainSOCKS domain contain two parts: a subdomain, which tells which part of the protocol stack generated the error, and the error code itself.
Calling CFSocketStreamSOCKSGetError(_:) returns the error code itself, which must be interpreted in the context of the result of a call to CFSocketStreamSOCKSGetErrorSubdomain(_:). Possible return values (beyond subdomain-specific values such as client versions and HTTP error codes) are listed in Secure Sockets (SOCKS) Errors.
See Also
Streams
CFReadStreamCreateForHTTPRequest(_:_:)CFReadStreamCreateForStreamedHTTPRequest(_:_:_:)kCFStreamPropertyHTTPAttemptPersistentConnectionkCFStreamPropertyHTTPFinalRequestkCFStreamPropertyHTTPFinalURLkCFStreamPropertyHTTPProxykCFStreamPropertyHTTPProxyHostkCFStreamPropertyHTTPProxyPortkCFStreamPropertyHTTPRequestBytesWrittenCountkCFStreamPropertyHTTPResponseHeaderkCFStreamPropertyHTTPSProxyHostkCFStreamPropertyHTTPSProxyPortkCFStreamPropertyHTTPShouldAutoredirectCFWriteStreamCreateWithFTPURL(_:_:)CFReadStreamCreateWithFTPURL(_:_:)