︙ | | | ︙ | |
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
node: (unsigned char [IPX_NODE_LEN])node
network: (uint32_t)network
port: (uint16_t)port
#ifdef OF_HAVE_BLOCKS
block: (OFSPXSocketAsyncConnectBlock)block
#endif
;
- (void)startWithRunLoopMode: (of_run_loop_mode_t)runLoopMode;
@end
@implementation OFSPXSocketAsyncConnectDelegate
- (instancetype)initWithSocket: (OFSPXSocket *)sock
node: (unsigned char [IPX_NODE_LEN])node
network: (uint32_t)network
port: (uint16_t)port
|
|
|
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
node: (unsigned char [IPX_NODE_LEN])node
network: (uint32_t)network
port: (uint16_t)port
#ifdef OF_HAVE_BLOCKS
block: (OFSPXSocketAsyncConnectBlock)block
#endif
;
- (void)startWithRunLoopMode: (OFRunLoopMode)runLoopMode;
@end
@implementation OFSPXSocketAsyncConnectDelegate
- (instancetype)initWithSocket: (OFSPXSocket *)sock
node: (unsigned char [IPX_NODE_LEN])node
network: (uint32_t)network
port: (uint16_t)port
|
︙ | | | ︙ | |
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
#ifdef OF_HAVE_BLOCKS
[_block release];
#endif
[super dealloc];
}
- (void)startWithRunLoopMode: (of_run_loop_mode_t)runLoopMode
{
of_socket_address_t address =
of_socket_address_ipx(_node, _network, _port);
id exception = nil;
int errNo;
if (![_socket of_createSocketForAddress: &address errNo: &errNo]) {
|
|
|
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
#ifdef OF_HAVE_BLOCKS
[_block release];
#endif
[super dealloc];
}
- (void)startWithRunLoopMode: (OFRunLoopMode)runLoopMode
{
of_socket_address_t address =
of_socket_address_ipx(_node, _network, _port);
id exception = nil;
int errNo;
if (![_socket of_createSocketForAddress: &address errNo: &errNo]) {
|
︙ | | | ︙ | |
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
|
- (void)asyncConnectToNode: (unsigned char [_Nonnull IPX_NODE_LEN])node
network: (uint32_t)network
port: (uint16_t)port
{
[self asyncConnectToNode: node
network: network
port: port
runLoopMode: of_run_loop_mode_default];
}
- (void)asyncConnectToNode: (unsigned char [_Nonnull IPX_NODE_LEN])node
network: (uint32_t)network
port: (uint16_t)port
runLoopMode: (of_run_loop_mode_t)runLoopMode
{
void *pool = objc_autoreleasePoolPush();
[[[[OFSPXSocketAsyncConnectDelegate alloc]
initWithSocket: self
node: node
network: network
|
|
|
|
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
|
- (void)asyncConnectToNode: (unsigned char [_Nonnull IPX_NODE_LEN])node
network: (uint32_t)network
port: (uint16_t)port
{
[self asyncConnectToNode: node
network: network
port: port
runLoopMode: OFDefaultRunLoopMode];
}
- (void)asyncConnectToNode: (unsigned char [_Nonnull IPX_NODE_LEN])node
network: (uint32_t)network
port: (uint16_t)port
runLoopMode: (OFRunLoopMode)runLoopMode
{
void *pool = objc_autoreleasePoolPush();
[[[[OFSPXSocketAsyncConnectDelegate alloc]
initWithSocket: self
node: node
network: network
|
︙ | | | ︙ | |
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
|
network: (uint32_t)network
port: (uint16_t)port
block: (OFSPXSocketAsyncConnectBlock)block
{
[self asyncConnectToNode: node
network: network
port: port
runLoopMode: of_run_loop_mode_default
block: block];
}
- (void)asyncConnectToNode: (unsigned char [_Nonnull IPX_NODE_LEN])node
network: (uint32_t)network
port: (uint16_t)port
runLoopMode: (of_run_loop_mode_t)runLoopMode
block: (OFSPXSocketAsyncConnectBlock)block
{
void *pool = objc_autoreleasePoolPush();
[[[[OFSPXSocketAsyncConnectDelegate alloc]
initWithSocket: self
node: node
|
|
|
|
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
|
network: (uint32_t)network
port: (uint16_t)port
block: (OFSPXSocketAsyncConnectBlock)block
{
[self asyncConnectToNode: node
network: network
port: port
runLoopMode: OFDefaultRunLoopMode
block: block];
}
- (void)asyncConnectToNode: (unsigned char [_Nonnull IPX_NODE_LEN])node
network: (uint32_t)network
port: (uint16_t)port
runLoopMode: (OFRunLoopMode)runLoopMode
block: (OFSPXSocketAsyncConnectBlock)block
{
void *pool = objc_autoreleasePoolPush();
[[[[OFSPXSocketAsyncConnectDelegate alloc]
initWithSocket: self
node: node
|
︙ | | | ︙ | |