282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
|
@throw [OFConnectionFailedException
exceptionWithClass: [self class]
socket: self
host: host
port: port];
if (SOCKS5Host != nil)
[self _SOCKS5ConnectToHost: destinationHost
port: destinationPort];
}
#ifdef OF_HAVE_BLOCKS
- (void)asyncConnectToHost: (OFString*)host
port: (uint16_t)port
block: (of_tcpsocket_async_connect_block_t)block
{
|
|
|
|
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
|
@throw [OFConnectionFailedException
exceptionWithClass: [self class]
socket: self
host: host
port: port];
if (SOCKS5Host != nil)
[self OF_SOCKS5ConnectToHost: destinationHost
port: destinationPort];
}
#ifdef OF_HAVE_BLOCKS
- (void)asyncConnectToHost: (OFString*)host
port: (uint16_t)port
block: (of_tcpsocket_async_connect_block_t)block
{
|
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
|
return newSocket;
}
#ifdef OF_HAVE_BLOCKS
- (void)asyncAcceptWithBlock: (of_tcpsocket_async_accept_block_t)block
{
[OFRunLoop _addAsyncAcceptForTCPSocket: self
block: block];
}
#endif
- (void)setKeepAlivesEnabled: (BOOL)enable
{
int v = enable;
|
|
|
|
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
|
return newSocket;
}
#ifdef OF_HAVE_BLOCKS
- (void)asyncAcceptWithBlock: (of_tcpsocket_async_accept_block_t)block
{
[OFRunLoop OF_addAsyncAcceptForTCPSocket: self
block: block];
}
#endif
- (void)setKeepAlivesEnabled: (BOOL)enable
{
int v = enable;
|