@@ -64,11 +64,11 @@ Class of_tls_socket_class = Nil; static OFString *defaultSOCKS5Host = nil; static uint16_t defaultSOCKS5Port = 1080; -@interface OFTCPSocket_AsyncConnectDelegate: OFObject { OFTCPSocket *_socket; OFString *_host; uint16_t _port; @@ -112,19 +112,19 @@ - (void)tryNextAddressWithRunLoopMode: (of_run_loop_mode_t)runLoopMode; - (void)startWithRunLoopMode: (of_run_loop_mode_t)runLoopMode; - (void)sendSOCKS5Request; @end -@interface OFTCPSocket_ConnectDelegate: OFObject +@interface OFTCPSocketConnectDelegate: OFObject { @public bool _done; id _exception; } @end -@implementation OFTCPSocket_AsyncConnectDelegate +@implementation OFTCPSocketAsyncConnectDelegate - (instancetype)initWithSocket: (OFTCPSocket *)sock host: (OFString *)host port: (uint16_t)port SOCKS5Host: (OFString *)SOCKS5Host SOCKS5Port: (uint16_t)SOCKS5Port @@ -578,11 +578,11 @@ return nil; } } @end -@implementation OFTCPSocket_ConnectDelegate +@implementation OFTCPSocketConnectDelegate - (void)dealloc { [_exception release]; [super dealloc]; @@ -709,12 +709,12 @@ - (void)connectToHost: (OFString *)host port: (uint16_t)port { void *pool = objc_autoreleasePoolPush(); id delegate = [_delegate retain]; - OFTCPSocket_ConnectDelegate *connectDelegate = - [[[OFTCPSocket_ConnectDelegate alloc] init] autorelease]; + OFTCPSocketConnectDelegate *connectDelegate = + [[[OFTCPSocketConnectDelegate alloc] init] autorelease]; OFRunLoop *runLoop = [OFRunLoop currentRunLoop]; self.delegate = connectDelegate; [self asyncConnectToHost: host port: port @@ -748,11 +748,11 @@ port: (uint16_t)port runLoopMode: (of_run_loop_mode_t)runLoopMode { void *pool = objc_autoreleasePoolPush(); - [[[[OFTCPSocket_AsyncConnectDelegate alloc] + [[[[OFTCPSocketAsyncConnectDelegate alloc] initWithSocket: self host: host port: port SOCKS5Host: _SOCKS5Host SOCKS5Port: _SOCKS5Port @@ -778,11 +778,11 @@ runLoopMode: (of_run_loop_mode_t)runLoopMode block: (of_tcp_socket_async_connect_block_t)block { void *pool = objc_autoreleasePoolPush(); - [[[[OFTCPSocket_AsyncConnectDelegate alloc] + [[[[OFTCPSocketAsyncConnectDelegate alloc] initWithSocket: self host: host port: port SOCKS5Host: _SOCKS5Host SOCKS5Port: _SOCKS5Port