Differences From Artifact [0e43bc61fd]:
- File src/OFTCPSocket.m — part of check-in [4f149012e9] at 2012-09-19 23:57:01 on branch trunk — Make async connecting possible without blocks. (user: js, size: 15495) [annotate] [blame] [check-ins using]
To Artifact [0f410ad5c9]:
- File
src/OFTCPSocket.m
— part of check-in
[1cb8fee5c3]
at
2012-10-13 21:06:59
on branch trunk
— of_bswap* -> OF_BSWAP*.
This makes it clear that multiple evaluation of parameters is possible. (user: js, size: 15495) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
348 349 350 351 352 353 354 | exceptionWithClass: [self class] socket: self host: host]; } memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; | | | 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 | exceptionWithClass: [self class] socket: self host: host]; } memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = OF_BSWAP16_IF_LE(port); if (he->h_addrtype != AF_INET || (sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) { # ifdef OF_THREADS [addrlist release]; [mutex unlock]; # endif |
︙ | ︙ | |||
521 522 523 524 525 526 527 | exceptionWithClass: [self class] socket: self host: host]; } memset(&addr, 0, sizeof(addr)); addr.in.sin_family = AF_INET; | | | 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 | exceptionWithClass: [self class] socket: self host: host]; } memset(&addr, 0, sizeof(addr)); addr.in.sin_family = AF_INET; addr.in.sin_port = OF_BSWAP16_IF_LE(port); if (he->h_addrtype != AF_INET || he->h_addr_list[0] == NULL) { # ifdef OF_THREADS [mutex unlock]; # endif @throw [OFAddressTranslationFailedException exceptionWithClass: [self class] |
︙ | ︙ | |||
568 569 570 571 572 573 574 | @throw [OFBindFailedException exceptionWithClass: [self class] socket: self host: host port: port]; } if (addr.storage.ss_family == AF_INET) | | | | 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 | @throw [OFBindFailedException exceptionWithClass: [self class] socket: self host: host port: port]; } if (addr.storage.ss_family == AF_INET) return OF_BSWAP16_IF_LE(addr.in.sin_port); if (addr.storage.ss_family == AF_INET6) return OF_BSWAP16_IF_LE(addr.in6.sin6_port); close(sock); sock = INVALID_SOCKET; @throw [OFBindFailedException exceptionWithClass: [self class] socket: self host: host port: port]; |
︙ | ︙ |