Differences From Artifact [596449d526]:
- File src/OFTCPSocket.m — part of check-in [3cd89fa8ba] at 2018-06-24 22:08:17 on branch trunk — Rename -[listenWith{BackLog -> Backlog}:] (user: js, size: 15243) [annotate] [blame] [check-ins using]
To Artifact [7dca3c8c74]:
- File
src/OFTCPSocket.m
— part of check-in
[8aeee6680a]
at
2018-07-28 20:21:01
on branch trunk
— Add of_socket_address_ip_string()
This replaces of_address_to_string_and_port(). (user: js, size: 15482) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
44 45 46 47 48 49 50 51 52 53 54 55 56 57 | #import "OFConnectionFailedException.h" #import "OFGetOptionFailedException.h" #import "OFInvalidArgumentException.h" #import "OFListenFailedException.h" #import "OFNotImplementedException.h" #import "OFNotOpenException.h" #import "OFOutOfMemoryException.h" #import "OFSetOptionFailedException.h" #import "socket.h" #import "socket_helpers.h" #import "resolver.h" /* References for static linking */ | > | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | #import "OFConnectionFailedException.h" #import "OFGetOptionFailedException.h" #import "OFInvalidArgumentException.h" #import "OFListenFailedException.h" #import "OFNotImplementedException.h" #import "OFNotOpenException.h" #import "OFOutOfMemoryException.h" #import "OFOutOfRangeException.h" #import "OFSetOptionFailedException.h" #import "socket.h" #import "socket_helpers.h" #import "resolver.h" /* References for static linking */ |
︙ | ︙ | |||
597 598 599 600 601 602 603 | [OFRunLoop of_addAsyncAcceptForTCPSocket: self block: block]; } #endif - (OFString *)remoteAddress { | | > > > > | > | | 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 | [OFRunLoop of_addAsyncAcceptForTCPSocket: self block: block]; } #endif - (OFString *)remoteAddress { of_socket_address_t address; if (_socket == INVALID_SOCKET) @throw [OFNotOpenException exceptionWithObject: self]; if (_address == NULL) @throw [OFInvalidArgumentException exception]; if (_addressLength > sizeof(address.address)) @throw [OFOutOfRangeException exception]; memset(&address, '\0', sizeof(address)); memcpy(&address.address, _address, _addressLength); address.length = _addressLength; return of_socket_address_ip_string(&address, NULL); } - (bool)isListening { return _listening; } |
︙ | ︙ |