Comment: | Remove resolver.m
Instead, OFDNSResolver is used for everything now. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
6e9ee122eb2336a5e6f730393a100df6 |
User & Date: | js on 2018-10-07 02:06:46 |
Other Links: | manifest | tags |
2018-10-07
| ||
02:39 | OFDNSResolver: Look at static hosts to get address check-in: 4d335e89d6 user: js tags: trunk | |
02:06 | Remove resolver.m check-in: 6e9ee122eb user: js tags: trunk | |
2018-10-06
| ||
20:21 | OFDNSResolver: Add sync resolve socket addresses check-in: 22700e6082 user: js tags: trunk | |
Modified configure.ac from [0289c3600c] to [ca5e9322d2].
︙ | |||
1304 1305 1306 1307 1308 1309 1310 | 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | [Whether we have select() or similar]) AC_SUBST(OFKERNELEVENTOBSERVER_SELECT_M, "OFKernelEventObserver_select.m") ]) ;; esac |
︙ |
Modified src/Makefile from [d620634847] to [25efe5c01f].
︙ | |||
130 131 132 133 134 135 136 | 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | - | OFHTTPCookieManager.m \ OFHTTPRequest.m \ OFHTTPResponse.m \ OFHTTPServer.m \ OFStreamSocket.m \ OFTCPSocket.m \ OFUDPSocket.m \ |
︙ |
Modified src/OFDNSResolver.m from [8f4fd230d2] to [f094c42133].
︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | + | #import "OFFile.h" #import "OFLocale.h" #import "OFNumber.h" #import "OFPair.h" #import "OFString.h" #import "OFTimer.h" #import "OFUDPSocket.h" #import "OFUDPSocket+Private.h" #ifdef OF_WINDOWS # import "OFWindowsRegistryKey.h" #endif #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" |
︙ | |||
1780 1781 1782 1783 1784 1785 1786 1787 | 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 | + + + - + - + + + - + - | objectAtIndex: query->_nameServersIndex]; query->_usedNameServer = of_socket_address_parse_ip(nameServer, 53); switch (query->_usedNameServer.family) { #ifdef OF_HAVE_IPV6 case OF_SOCKET_ADDRESS_FAMILY_IPV6: if (_IPv6Socket == nil) { of_socket_address_t address = of_socket_address_parse_ip(@"::", 0); _IPv6Socket = [[OFUDPSocket alloc] init]; |
︙ | |||
2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 | 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 | + + + + + + + + + + + + + + + + + + + + + + | runLoopMode: (of_run_loop_mode_t)runLoopMode target: (id)target selector: (SEL)selector context: (id)userContext { void *pool = objc_autoreleasePoolPush(); OFDNSResolver_AsyncResolveSocketAddressesContext *context; @try { of_socket_address_t address = of_socket_address_parse_ip(host, 0); OFData *addresses; void (*method)(id, SEL, OFDNSResolver *, OFString *, OFData *, id, id); if (addressFamily != OF_SOCKET_ADDRESS_FAMILY_ANY && address.family != addressFamily) @throw [OFInvalidArgumentException exception]; addresses = [OFData dataWithItems: &address itemSize: sizeof(address) count: 1]; method = (void (*)(id, SEL, OFDNSResolver *, OFString *, OFData *, id, id))[target methodForSelector: selector]; method(target, selector, self, host, addresses, userContext, nil); } @catch (OFInvalidFormatException *e) { } context = [[[OFDNSResolver_AsyncResolveSocketAddressesContext alloc] initWithHost: host target: target selector: selector context: userContext] autorelease]; |
︙ |
Modified src/OFRunLoop.m from [54ecb2a574] to [b99d9d1539].
︙ | |||
1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 | 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 | + | beforeDate: deadline]; } - (void)runMode: (of_run_loop_mode_t)mode beforeDate: (OFDate *)deadline { void *pool = objc_autoreleasePoolPush(); of_run_loop_mode_t previousMode = _currentMode; OFRunLoop_State *state = [self of_stateForMode: mode create: false]; if (state == nil) return; _currentMode = mode; |
︙ | |||
1247 1248 1249 1250 1251 1252 1253 | 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 | - + | #else [OFThread sleepForTimeInterval: 86400]; #endif } objc_autoreleasePoolPop(pool); } @finally { |
︙ |
Modified src/OFTCPSocket.m from [2642e89679] to [0378e7d3f9].
︙ | |||
53 54 55 56 57 58 59 | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | - | #import "OFNotOpenException.h" #import "OFOutOfMemoryException.h" #import "OFOutOfRangeException.h" #import "OFSetOptionFailedException.h" #import "socket.h" #import "socket_helpers.h" |
︙ | |||
862 863 864 865 866 867 868 | 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 | - + - + + + + - + - - - - + + + + - + - - - - - - - + + + + + + - + - - + + - - + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + - - - + - - - - - - - - - - - - - + - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + + + + + + + + + + - + | objc_autoreleasePoolPop(pool); } #endif - (uint16_t)bindToHost: (OFString *)host port: (uint16_t)port { |
︙ |
Added src/OFUDPSocket+Private.h version [9f1517e8f1].
|
Modified src/OFUDPSocket.h from [29dec683be] to [201326e03a].
︙ | |||
24 25 26 27 28 29 30 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | - - - - - - - - - - - - - | OF_ASSUME_NONNULL_BEGIN /*! @file */ @class OFUDPSocket; #ifdef OF_HAVE_BLOCKS |
︙ | |||
80 81 82 83 84 85 86 | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | - - - - - - + + + + + + | #endif /*! * @class OFUDPSocket OFUDPSocket.h ObjFW/OFUDPSocket.h * * @brief A class which provides methods to create and use UDP sockets. * |
︙ | |||
118 119 120 121 122 123 124 | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | /*! * @brief Returns a new, autoreleased OFUDPSocket. * * @return A new, autoreleased OFUDPSocket */ + (instancetype)socket; |
︙ |
Modified src/OFUDPSocket.m from [e0fb2ac475] to [073268c5ca].
︙ | |||
22 23 24 25 26 27 28 | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | - - + + + - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | #include <string.h> #ifdef HAVE_FCNTL_H # include <fcntl.h> #endif #import "OFUDPSocket.h" |
︙ | |||
324 325 326 327 328 329 330 | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | - - + - - - - - - - + + + - + - + - - - - - - - + + + + + + + + - + - - + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + - - - + - - - - - - - - - - - - - + - - - - - + + - - - - + + - - + + + + + - - + + - - + + - - - - - - - - - - - - - + - - - - - - - - - - - - - - + + - - + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + | _blocking = enable; #else OF_UNRECOGNIZED_SELECTOR #endif } |
︙ |
Modified src/ObjFW.h from [3fac06979c] to [ee89e1ae2e].
︙ | |||
239 240 241 242 243 244 245 | 239 240 241 242 243 244 245 246 247 248 | - - - | #import "base64.h" #import "crc16.h" #import "crc32.h" #import "huffman_tree.h" #import "instance.h" #import "of_asprintf.h" #import "of_strptime.h" |
Deleted src/resolver.h version [8e4bcb1595].
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Deleted src/resolver.m version [aa220e27b3].
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Modified src/socket.h from [2431bf7b16] to [949bb8ad8d].
︙ | |||
203 204 205 206 207 208 209 210 211 212 213 214 | 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | + + + + + + + + + + | * the address family used. * * @param address The address on which to set the port * @param port The port to set on the address */ extern void of_socket_address_set_port(of_socket_address_t *_Nonnull address, uint16_t port); /*! * @brief Returns the port of the specified of_socket_address_t, independent of * the address family used. * * @param address The address on which to get the port * @return The port of the address */ extern uint16_t of_socket_address_get_port( const of_socket_address_t *_Nonnull address); #ifdef __cplusplus } #endif OF_ASSUME_NONNULL_END |
Modified src/socket.m from [72b93f58cf] to [00380c738c].
︙ | |||
604 605 606 607 608 609 610 | 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 | + + + + + + + + + + + + + | case OF_SOCKET_ADDRESS_FAMILY_IPV6: address->sockaddr.in6.sin6_port = OF_BSWAP16_IF_LE(port); break; default: @throw [OFInvalidArgumentException exception]; } } uint16_t of_socket_address_get_port(const of_socket_address_t *address) { switch (address->family) { case OF_SOCKET_ADDRESS_FAMILY_IPV4: return OF_BSWAP16_IF_LE(address->sockaddr.in.sin_port); case OF_SOCKET_ADDRESS_FAMILY_IPV6: return OF_BSWAP16_IF_LE(address->sockaddr.in6.sin6_port); default: @throw [OFInvalidArgumentException exception]; } } |
Modified src/socket_helpers.h from [9196eb16cc] to [0b9f3f23ab].
︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | - - - - - - - - - | #include "socket.h" #ifndef INVALID_SOCKET # define INVALID_SOCKET -1 #endif |
︙ | |||
73 74 75 76 77 78 79 | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | - | #ifdef OF_WII # define accept(sock, addr, addrlen) net_accept(sock, addr, addrlen) # define bind(sock, addr, addrlen) net_bind(sock, addr, addrlen) # define closesocket(sock) net_close(sock) # define connect(sock, addr, addrlen) \ net_connect(sock, (struct sockaddr *)addr, addrlen) # define fcntl(fd, cmd, flags) net_fcntl(fd, cmd, flags) |
︙ |
Modified tests/OFUDPSocketTests.m from [1bbed581ea] to [b4dbd2c54c].
︙ | |||
39 40 41 42 43 44 45 | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | - - + - - - + - - | TEST(@"+[socket]", (sock = [OFUDPSocket socket])) TEST(@"-[bindToHost:port:]", (port1 = [sock bindToHost: @"127.0.0.1" port: 0])) |
︙ |