Differences From Artifact [fdb5be2048]:
- File src/OFTCPSocket.m — part of check-in [2965720dbc] at 2013-01-07 13:36:21 on branch trunk — Fix compilation on Win32. (user: js, size: 15728) [annotate] [blame] [check-ins using]
To Artifact [b609afae72]:
- File
src/OFTCPSocket.m
— part of check-in
[541b33d978]
at
2013-01-09 22:10:44
on branch trunk
— OFTCPSocket: Set ai_flags.
For connect(), this sets ai_flags to:
AI_NUMERICSERV | AI_ADDRCONFIGFor bind(), this sets ai_flags to:
AI_NUMERICSERV | AI_ADDRCONFIG | AI_PASSIVE (user: js, size: 15841) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
306 307 308 309 310 311 312 313 314 315 316 317 318 319 | #ifdef HAVE_THREADSAFE_GETADDRINFO struct addrinfo hints, *res, *res0; char portCString[7]; memset(&hints, 0, sizeof(struct addrinfo)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; snprintf(portCString, 7, "%" PRIu16, port); if (getaddrinfo([host cStringUsingEncoding: OF_STRING_ENCODING_NATIVE], portCString, &hints, &res0)) @throw [OFAddressTranslationFailedException exceptionWithClass: [self class] socket: self | > | 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 | #ifdef HAVE_THREADSAFE_GETADDRINFO struct addrinfo hints, *res, *res0; char portCString[7]; memset(&hints, 0, sizeof(struct addrinfo)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_NUMERICSERV | AI_ADDRCONFIG; snprintf(portCString, 7, "%" PRIu16, port); if (getaddrinfo([host cStringUsingEncoding: OF_STRING_ENCODING_NATIVE], portCString, &hints, &res0)) @throw [OFAddressTranslationFailedException exceptionWithClass: [self class] socket: self |
︙ | ︙ | |||
484 485 486 487 488 489 490 491 492 493 494 495 496 497 | #ifdef HAVE_THREADSAFE_GETADDRINFO struct addrinfo hints, *res; char portCString[7]; memset(&hints, 0, sizeof(struct addrinfo)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; snprintf(portCString, 7, "%" PRIu16, port); if (getaddrinfo([host cStringUsingEncoding: OF_STRING_ENCODING_NATIVE], portCString, &hints, &res)) @throw [OFAddressTranslationFailedException exceptionWithClass: [self class] socket: self | > | 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 | #ifdef HAVE_THREADSAFE_GETADDRINFO struct addrinfo hints, *res; char portCString[7]; memset(&hints, 0, sizeof(struct addrinfo)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_NUMERICSERV | AI_ADDRCONFIG | AI_PASSIVE; snprintf(portCString, 7, "%" PRIu16, port); if (getaddrinfo([host cStringUsingEncoding: OF_STRING_ENCODING_NATIVE], portCString, &hints, &res)) @throw [OFAddressTranslationFailedException exceptionWithClass: [self class] socket: self |
︙ | ︙ |