193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
|
if (_socket != OFInvalidSocketHandle &&
address->family == OFSocketAddressFamilyIPv4)
_flags |= flagMapIPv4;
else
_flags &= ~flagMapIPv4;
}
#elif defined(OF_MACOS) || defined(OF_IOS)
if (_flags & flagUseMPTCP) {
_socket = socket(AF_MULTIPATH, SOCK_STREAM | SOCK_CLOEXEC,
IPPROTO_TCP);
if (_socket != OFInvalidSocketHandle)
_flags |= flagUseConnectX;
else
|
|
|
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
|
if (_socket != OFInvalidSocketHandle &&
address->family == OFSocketAddressFamilyIPv4)
_flags |= flagMapIPv4;
else
_flags &= ~flagMapIPv4;
}
#elif (defined(OF_MACOS) || defined(OF_IOS)) && defined(SAE_ASSOCID_ANY)
if (_flags & flagUseMPTCP) {
_socket = socket(AF_MULTIPATH, SOCK_STREAM | SOCK_CLOEXEC,
IPPROTO_TCP);
if (_socket != OFInvalidSocketHandle)
_flags |= flagUseConnectX;
else
|
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
|
* IPv6 can both be used for a single connection.
*/
mappedIPv4 = mapIPv4(address);
address = &mappedIPv4;
}
#endif
#if defined(OF_MACOS) || defined(OF_IOS)
if (_flags & flagUseConnectX) {
sa_endpoints_t endpoints = {
.sae_dstaddr = (struct sockaddr *)&address->sockaddr,
.sae_dstaddrlen = address->length
};
if (connectx(_socket, &endpoints, SAE_ASSOCID_ANY, 0, NULL, 0,
|
|
|
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
|
* IPv6 can both be used for a single connection.
*/
mappedIPv4 = mapIPv4(address);
address = &mappedIPv4;
}
#endif
#if (defined(OF_MACOS) || defined(OF_IOS)) && defined(SAE_ASSOCID_ANY)
if (_flags & flagUseConnectX) {
sa_endpoints_t endpoints = {
.sae_dstaddr = (struct sockaddr *)&address->sockaddr,
.sae_dstaddrlen = address->length
};
if (connectx(_socket, &endpoints, SAE_ASSOCID_ANY, 0, NULL, 0,
|