Overview
Comment: | Rename +[UDPSocket hostForAddress:port:]
It is now called +[getHost:andPort:forAddress:]. This makes it much |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
fb590316ba20dc31dbed2030a46705ec |
User & Date: | js on 2014-01-30 12:26:12 |
Other Links: | manifest | tags |
Context
2014-01-30
| ||
12:26 | Rename of_tcpsocket* -> of_tcp_socket_* check-in: 7908c035e4 user: js tags: trunk | |
12:26 | Rename +[UDPSocket hostForAddress:port:] check-in: fb590316ba user: js tags: trunk | |
2014-01-29
| ||
15:59 | OFUDPSocket: Add observing check-in: c4f36e3692 user: js tags: trunk | |
Changes
Modified src/OFTCPSocket.m from [f24c3b3ba4] to [fb3f587e28].
︙ | |||
496 497 498 499 500 501 502 503 504 505 506 507 508 | 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 | + + - + + + | if (setsockopt(_socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&v, sizeof(v))) @throw [OFSetOptionFailedException exceptionWithStream: self]; } - (OFString*)remoteAddress { OFString *ret; if (_socket == INVALID_SOCKET) @throw [OFNotConnectedException exceptionWithSocket: self]; if (_address == NULL) @throw [OFInvalidArgumentException exception]; |
︙ |
Modified src/OFUDPSocket.h from [7885c380e7] to [2a7d7dd320].
︙ | |||
62 63 64 65 66 67 68 | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | - + - - + + - + - - + + + | * host / port pair */ + (void)resolveAddressForHost: (OFString*)host port: (uint16_t)port address: (of_udp_socket_address_t*)address; /*! |
︙ |
Modified src/OFUDPSocket.m from [e5e2000892] to [584c86fff6].
︙ | |||
157 158 159 160 161 162 163 | 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | - - + + + - - + + | memcpy(&address->address, results[0]->address, results[0]->addressLength); address->length = results[0]->addressLength; of_resolver_free(results); } |
︙ |
Modified src/resolver.h from [2514a83524] to [2d84450251].
︙ | |||
49 50 51 52 53 54 55 56 57 | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | + + - - - + + | int protocol); /*! * @brief Converts the specified address to a string and port pair. * * @param address The address to convert to a string * @param addressLength The length of the address to convert to a string * @param host A pointer to an OFString* which should be set to the host of the * address or NULL if the host is not needed * @param port A pointer to an uint16_t which should be set to the port of the * address or NULL if the port is not needed |
Modified src/resolver.m from [03983c4b06] to [5111ebd364].
︙ | |||
205 206 207 208 209 210 211 | 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 | - + - + - + - + + + + - - - - + + - + - + - + | @throw [OFUnlockFailedException exception]; # endif #endif return ret; } |
︙ |
Modified tests/OFUDPSocketTests.m from [c4340e1e26] to [d252ab9bf0].
︙ | |||
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 | + | - (void)UDPSocketTests { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFUDPSocket *sock; uint16_t port1, port2; of_udp_socket_address_t addr1, addr2, addr3; char buf[6]; OFString *host; TEST(@"+[socket]", (sock = [OFUDPSocket socket])) TEST(@"-[bindToHost:port:]", (port1 = [sock bindToHost: @"127.0.0.1" port: 0])) |
︙ | |||
53 54 55 56 57 58 59 | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | - - - - + + + + + | TEST(@"-[receiveIntoBuffer:length:sender:]", [sock receiveIntoBuffer: buf length: 6 sender: &addr2] == 6 && !memcmp(buf, "Hello", 6)) |
︙ |