Differences From Artifact [4b99095be9]:
- File
src/OFTCPSocket.m
— part of check-in
[49b1989b63]
at
2014-01-26 22:38:28
on branch trunk
— Move resolving functionality to resolver.m
This is in preparation for UDP sockets, so that they can share the
resolving functionality with TCP sockets. (user: js, size: 11085) [annotate] [blame] [check-ins using]
To Artifact [f24c3b3ba4]:
- File src/OFTCPSocket.m — part of check-in [44c595058b] at 2014-01-27 12:34:10 on branch trunk — of_address_to_string: Add a way to get the port (user: js, size: 11108) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
403 404 405 406 407 408 409 | } if (port > 0) return port; #ifndef __wii__ addrLen = sizeof(addr.storage); | | | 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 | } if (port > 0) return port; #ifndef __wii__ addrLen = sizeof(addr.storage); if (getsockname(_socket, (struct sockaddr*)&addr.storage, &addrLen)) { close(_socket); _socket = INVALID_SOCKET; @throw [OFBindFailedException exceptionWithHost: host port: port socket: self]; } |
︙ | ︙ | |||
502 503 504 505 506 507 508 | { if (_socket == INVALID_SOCKET) @throw [OFNotConnectedException exceptionWithSocket: self]; if (_address == NULL) @throw [OFInvalidArgumentException exception]; | | | 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 | { if (_socket == INVALID_SOCKET) @throw [OFNotConnectedException exceptionWithSocket: self]; if (_address == NULL) @throw [OFInvalidArgumentException exception]; return of_address_to_string_and_port(_address, _addressLength, NULL); } - (bool)isListening { return _listening; } |
︙ | ︙ |