Overview
Comment: | OFTCPSocket: Implement sync connect via async |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
c5c4d38220881a9077f98592c4d525b9 |
User & Date: | js on 2018-10-06 19:36:27 |
Other Links: | manifest | tags |
Context
2018-10-06
| ||
19:41 | OFTCPSocket: -[setBlocking:] on new connections check-in: 02073abe82 user: js tags: trunk | |
19:36 | OFTCPSocket: Implement sync connect via async check-in: c5c4d38220 user: js tags: trunk | |
18:39 | OFSystemInfo: Fix signedness in comparison check-in: 9723036211 user: js tags: trunk | |
Changes
Modified src/Makefile from [a4eb0eb187] to [d620634847].
︙ | |||
198 199 200 201 202 203 204 | 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | - | SRCS_FILES += OFSettings_INIFile.m \ OFURLHandler_file.m SRCS_SOCKETS += OFKernelEventObserver.m \ ${OFKERNELEVENTOBSERVER_EPOLL_M} \ ${OFKERNELEVENTOBSERVER_KQUEUE_M} \ ${OFKERNELEVENTOBSERVER_POLL_M} \ ${OFKERNELEVENTOBSERVER_SELECT_M} \ |
︙ |
Deleted src/OFTCPSocket+SOCKS5.h version [be2dcebc93].
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Deleted src/OFTCPSocket+SOCKS5.m version [9396f7978b].
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Modified src/OFTCPSocket.m from [1071039b7f] to [b569f752f9].
︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | - + | #ifdef HAVE_FCNTL_H # include <fcntl.h> #endif #import "OFTCPSocket.h" #import "OFTCPSocket+Private.h" |
︙ | |||
55 56 57 58 59 60 61 | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | - - - - - - - + - + | #import "OFOutOfRangeException.h" #import "OFSetOptionFailedException.h" #import "socket.h" #import "socket_helpers.h" #import "resolver.h" |
︙ | |||
147 148 149 150 151 152 153 | 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | + + + + + + + + + + + + - + | - (bool)socket: (OFTCPSocket *)sock didReadSOCKS5AddressLength: (unsigned char *)addressLength length: (size_t)length context: (id)context exception: (id)exception; @end @interface OFTCPSocket_ConnectContext: OFObject { @public bool _connected; id _exception; } - (void)socketDidConnect: (OFTCPSocket *)sock context: (id)context exception: (id)exception; @end |
︙ | |||
631 632 633 634 635 636 637 638 639 640 641 642 643 644 | 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 | + + + + + + + + + + + + + + + + + + + | target: self selector: @selector(socket:didReadSOCKS5Address: length:context:exception:) context: nil]; return false; } @end @implementation OFTCPSocket_ConnectContext - (void)dealloc { [_exception release]; [super dealloc]; } - (void)socketDidConnect: (OFTCPSocket *)sock context: (id)context exception: (id)exception { if (exception != nil) _exception = [exception retain]; _connected = true; } @end @implementation OFTCPSocket @synthesize SOCKS5Host = _SOCKS5Host, SOCKS5Port = _SOCKS5Port; + (void)setSOCKS5Host: (OFString *)host { id old = defaultSOCKS5Host; |
︙ | |||
739 740 741 742 743 744 745 | 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 | - - - - - - - - + + + + - - - - - - + + - - + - - - - + - - - - - - - - - - - - + - - + + - - - - - + + - - - - + - - - - + - - - - - + - - - - - + + + + - - + - - - - - - - - + | return errNo; } - (void)connectToHost: (OFString *)host port: (uint16_t)port { |
︙ | |||
833 834 835 836 837 838 839 | 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 | - + | runLoopMode: (of_run_loop_mode_t)runLoopMode target: (id)target selector: (SEL)selector context: (id)context { void *pool = objc_autoreleasePoolPush(); |
︙ | |||
865 866 867 868 869 870 871 | 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 | - + | - (void)asyncConnectToHost: (OFString *)host port: (uint16_t)port runLoopMode: (of_run_loop_mode_t)runLoopMode block: (of_tcp_socket_async_connect_block_t)block { void *pool = objc_autoreleasePoolPush(); |
︙ |