Differences From Artifact [bfcab86676]:
- File src/OFTCPSocket.m — part of check-in [f8498bb114] at 2017-09-24 11:24:34 on branch trunk — Change type for async exceptions to id (user: js, size: 15098) [annotate] [blame] [check-ins using] [more...]
To Artifact [f8b1b83a89]:
- File
src/OFTCPSocket.m
— part of check-in
[2f4e0df8be]
at
2017-10-17 00:33:37
on branch trunk
— Do not use implicit method return types
Instead, explicitly declare them, as OF_ASSUME_NONNULL_{BEGIN,END} does
not apply to implicit return types. This means that after this commit,
all init methods have a nonnull return type, as they should have. (user: js, size: 15232) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
77 78 79 80 81 82 83 | id _context; # ifdef OF_HAVE_BLOCKS of_tcp_socket_async_connect_block_t _block; # endif id _exception; } | | | | | | | | | | | | | > | | | | | | | | | | | | | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | id _context; # ifdef OF_HAVE_BLOCKS of_tcp_socket_async_connect_block_t _block; # endif id _exception; } - (instancetype)initWithSourceThread: (OFThread *)sourceThread socket: (OFTCPSocket *)socket host: (OFString *)host port: (uint16_t)port target: (id)target selector: (SEL)selector context: (id)context; # ifdef OF_HAVE_BLOCKS - (instancetype)initWithSourceThread: (OFThread *)sourceThread socket: (OFTCPSocket *)socket host: (OFString *)host port: (uint16_t)port block: (of_tcp_socket_async_connect_block_t) block; # endif @end @implementation OFTCPSocket_ConnectThread - (instancetype)initWithSourceThread: (OFThread *)sourceThread socket: (OFTCPSocket *)socket host: (OFString *)host port: (uint16_t)port target: (id)target selector: (SEL)selector context: (id)context { self = [super init]; @try { _sourceThread = [sourceThread retain]; _socket = [socket retain]; _host = [host copy]; _port = port; _target = [target retain]; _selector = selector; _context = [context retain]; } @catch (id e) { [self release]; @throw e; } return self; } # ifdef OF_HAVE_BLOCKS - (instancetype)initWithSourceThread: (OFThread *)sourceThread socket: (OFTCPSocket *)socket host: (OFString *)host port: (uint16_t)port block: (of_tcp_socket_async_connect_block_t)block { self = [super init]; @try { _sourceThread = [sourceThread retain]; _socket = [socket retain]; _host = [host copy]; |
︙ | ︙ | |||
225 226 227 228 229 230 231 | } + (uint16_t)SOCKS5Port { return defaultSOCKS5Port; } | | | 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | } + (uint16_t)SOCKS5Port { return defaultSOCKS5Port; } - (instancetype)init { self = [super init]; @try { _socket = INVALID_SOCKET; _SOCKS5Host = [defaultSOCKS5Host copy]; _SOCKS5Port = defaultSOCKS5Port; |
︙ | ︙ |