46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
#import "OFConnectionFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFListenFailedException.h"
#import "OFNotConnectedException.h"
#import "OFNotImplementedException.h"
#import "OFSetOptionFailedException.h"
#import "macros.h"
#ifndef INVALID_SOCKET
# define INVALID_SOCKET -1
#endif
#if defined(OF_THREADS) && !defined(HAVE_THREADSAFE_GETADDRINFO)
|
>
|
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
#import "OFConnectionFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFListenFailedException.h"
#import "OFNotConnectedException.h"
#import "OFNotImplementedException.h"
#import "OFSetOptionFailedException.h"
#import "autorelease.h"
#import "macros.h"
#ifndef INVALID_SOCKET
# define INVALID_SOCKET -1
#endif
#if defined(OF_THREADS) && !defined(HAVE_THREADSAFE_GETADDRINFO)
|
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
|
port: (uint16_t)port
block: (of_tcpsocket_async_connect_block_t)block
{
void *pool = objc_autoreleasePoolPush();
OFRunLoop *runLoop = [OFRunLoop currentRunLoop];
[[OFThread threadWithObject: self
block: ^ (id s) {
void *pool2 = objc_autoreleasePoolPush();
OFThread *connectThread = [OFThread currentThread];
OFTimer *timer;
[s connectToHost: host
port: port];
|
|
|
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
|
port: (uint16_t)port
block: (of_tcpsocket_async_connect_block_t)block
{
void *pool = objc_autoreleasePoolPush();
OFRunLoop *runLoop = [OFRunLoop currentRunLoop];
[[OFThread threadWithObject: self
block: ^ id (id s) {
void *pool2 = objc_autoreleasePoolPush();
OFThread *connectThread = [OFThread currentThread];
OFTimer *timer;
[s connectToHost: host
port: port];
|