Differences From Artifact [f42e23d703]:
- File src/OFTCPSocket.m — part of check-in [3dec8ecf2e] at 2019-08-09 23:44:51 on branch trunk — Support sockets on AmigaOS 3 (user: js, size: 26064) [annotate] [blame] [check-ins using]
To Artifact [21a88b2103]:
- File
src/OFTCPSocket.m
— part of check-in
[ee592cf603]
at
2019-10-07 00:07:55
on branch trunk
— OFDNSResolver: Major refactor
This temporarily doesn't use the search domains anymore and makes CNAMEs
slightly more inefficient. The next commits will fix both. (user: js, size: 26020) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
317 318 319 320 321 322 323 | #if defined(OF_NINTENDO_3DS) || defined(OF_WII) _socket.blocking = false; #endif [self didConnect]; } | | | | | | | 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 | #if defined(OF_NINTENDO_3DS) || defined(OF_WII) _socket.blocking = false; #endif [self didConnect]; } - (void)resolver: (OFDNSResolver *)resolver didResolveHost: (OFString *)host addresses: (OFData *)addresses exception: (id)exception { if (exception != nil) { _exception = [exception retain]; [self didConnect]; return; } _socketAddresses = [addresses copy]; [self tryNextAddressWithRunLoopMode: [OFRunLoop currentRunLoop].currentMode]; } - (void)startWithRunLoopMode: (of_run_loop_mode_t)runLoopMode { |
︙ | ︙ | |||
365 366 367 368 369 370 371 | [self tryNextAddressWithRunLoopMode: runLoopMode]; return; } @catch (OFInvalidFormatException *e) { } [[OFThread DNSResolver] | | | | | | 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 | [self tryNextAddressWithRunLoopMode: runLoopMode]; return; } @catch (OFInvalidFormatException *e) { } [[OFThread DNSResolver] asyncResolveAddressesForHost: host addressFamily: OF_SOCKET_ADDRESS_FAMILY_ANY runLoopMode: runLoopMode delegate: self]; } - (void)sendSOCKS5Request { OFData *data = [OFData dataWithItems: "\x05\x01\x00" count: 3]; |
︙ | ︙ | |||
808 809 810 811 812 813 814 | @throw [OFAlreadyConnectedException exceptionWithSocket: self]; if (_SOCKS5Host != nil) @throw [OFNotImplementedException exceptionWithSelector: _cmd object: self]; socketAddresses = [[OFThread DNSResolver] | | | | 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 | @throw [OFAlreadyConnectedException exceptionWithSocket: self]; if (_SOCKS5Host != nil) @throw [OFNotImplementedException exceptionWithSelector: _cmd object: self]; socketAddresses = [[OFThread DNSResolver] resolveAddressesForHost: host addressFamily: OF_SOCKET_ADDRESS_FAMILY_ANY]; address = *(of_socket_address_t *)[socketAddresses itemAtIndex: 0]; of_socket_address_set_port(&address, port); if ((_socket = socket(address.sockaddr.sockaddr.sa_family, SOCK_STREAM | SOCK_CLOEXEC, 0)) == INVALID_SOCKET) @throw [OFBindFailedException |
︙ | ︙ |