79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
-
+
|
# endif
else
OFEnsure(0);
} else {
#endif
if ([_delegate respondsToSelector:
@selector(socket:didConnectToHost:port:exception:)])
[_delegate socket: _socket
[_delegate socket: _socket
didConnectToHost: _host
port: _port
exception: _exception];
#ifdef OF_HAVE_BLOCKS
}
#endif
}
|
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
|
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
|
+
+
+
+
|
[_socket setCanBlock: true];
#else
[_socket setCanBlock: false];
#endif
if (![_socket of_connectSocketToAddress: &address errNo: &errNo]) {
#if !defined(OF_NINTENDO_3DS) && !defined(OF_WII)
# ifdef OF_WINDOWS
if (errNo == EINPROGRESS || errNo == EWOULDBLOCK) {
# else
if (errNo == EINPROGRESS) {
# endif
[OFRunLoop of_addAsyncConnectForSocket: _socket
mode: runLoopMode
delegate: self];
return;
} else {
#endif
[_socket of_closeSocket];
|