Index: src/OFHTTPClient.h ================================================================== --- src/OFHTTPClient.h +++ src/OFHTTPClient.h @@ -188,7 +188,5 @@ redirects: (size_t)redirects; @end @interface OFObject (OFHTTPClientDelegate) @end - -extern Class of_http_client_tls_socket_class; Index: src/OFHTTPClient.m ================================================================== --- src/OFHTTPClient.m +++ src/OFHTTPClient.m @@ -40,12 +40,10 @@ #import "OFUnsupportedVersionException.h" #import "autorelease.h" #import "macros.h" -Class of_http_client_tls_socket_class = Nil; - static OF_INLINE void normalize_key(char *str_) { uint8_t *str = (uint8_t*)str_; BOOL firstLetter = YES; @@ -144,17 +142,16 @@ URL: URL]; if ([scheme isEqual: @"http"]) sock = [OFTCPSocket socket]; else { - if (of_http_client_tls_socket_class == Nil) + if (of_tls_socket_class == Nil) @throw [OFUnsupportedProtocolException exceptionWithClass: [self class] URL: URL]; - sock = [[[of_http_client_tls_socket_class alloc] init] - autorelease]; + sock = [[[of_tls_socket_class alloc] init] autorelease]; } [delegate client: self didCreateSocket: sock request: request]; Index: src/OFTCPSocket.h ================================================================== --- src/OFTCPSocket.h +++ src/OFTCPSocket.h @@ -235,5 +235,13 @@ * * @return Whether the socket is a listening socket */ - (BOOL)isListening; @end + +#ifdef __cplusplus +extern "C" { +#endif +extern Class of_tls_socket_class; +#ifdef __cplusplus +} +#endif Index: src/OFTCPSocket.m ================================================================== --- src/OFTCPSocket.m +++ src/OFTCPSocket.m @@ -71,10 +71,12 @@ /* References for static linking */ void _references_to_categories_of_OFTCPSocket(void) { _OFTCPSocket_SOCKS5_reference = 1; } + +Class of_tls_socket_class = Nil; static OFString *defaultSOCKS5Host = nil; static uint16_t defaultSOCKS5Port = 1080; @interface OFTCPSocket_ConnectThread: OFThread