Differences From Artifact [347a5e2986]:
- File
src/OFHostAddressResolver.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: 8512) [annotate] [blame] [check-ins using]
To Artifact [45979fed60]:
- File
src/OFHostAddressResolver.m
— part of check-in
[e3c911c7f5]
at
2019-10-07 20:32:09
on branch trunk
— Split OFDNSResolverDelegate into two delegates
These are different enough that it makes no sense to have them in one.
Having them in one means all methods are @optional and typos cannot be
caught by the compiler. (user: js, size: 8524) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
27 28 29 30 31 32 33 | #import "OFString.h" #import "OFTimer.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFResolveHostFailedException.h" | | | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | #import "OFString.h" #import "OFTimer.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFResolveHostFailedException.h" @interface OFHostAddressResolverDelegate: OFObject <OFDNSResolverHostDelegate> { @public bool _done; OFData *_addresses; id _exception; } @end |
︙ | ︙ | |||
67 68 69 70 71 72 73 | *address = [record address]; return true; } static void callDelegateInMode(of_run_loop_mode_t runLoopMode, | | | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | *address = [record address]; return true; } static void callDelegateInMode(of_run_loop_mode_t runLoopMode, id <OFDNSResolverHostDelegate> delegate, OFDNSResolver *resolver, OFString *host, OFData *addresses, id exception) { SEL selector = @selector(resolver:didResolveHost:addresses:exception:); if ([delegate respondsToSelector: selector]) { OFTimer *timer = [OFTimer timerWithTimeInterval: 0 |
︙ | ︙ | |||
93 94 95 96 97 98 99 | @implementation OFHostAddressResolver: OFObject - (instancetype)initWithHost: (OFString *)host addressFamily: (of_socket_address_family_t)addressFamily resolver: (OFDNSResolver *)resolver settings: (OFDNSResolverSettings *)settings runLoopMode: (of_run_loop_mode_t)runLoopMode | | | 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | @implementation OFHostAddressResolver: OFObject - (instancetype)initWithHost: (OFString *)host addressFamily: (of_socket_address_family_t)addressFamily resolver: (OFDNSResolver *)resolver settings: (OFDNSResolverSettings *)settings runLoopMode: (of_run_loop_mode_t)runLoopMode delegate: (id <OFDNSResolverHostDelegate>)delegate { self = [super init]; @try { _host = [host copy]; _addressFamily = addressFamily; _resolver = [resolver retain]; |
︙ | ︙ |