Differences From Artifact [e235fd33e4]:
- File src/OFIPSocketAsyncConnector.m — part of check-in [1a86b8175b] at 2022-02-12 07:46:07 on branch trunk — Update copyright (user: js, size: 5863) [annotate] [blame] [check-ins using] [more...]
To Artifact [ca32b06485]:
- File
src/OFIPSocketAsyncConnector.m
— part of check-in
[a54730b88f]
at
2022-10-22 18:41:45
on branch trunk
— OFSocket: Don't combine port for IP and IPX
While it works for those two protocols, it's a bad precedent as other
protocols have different types for ports. (user: js, size: 5893) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
19 20 21 22 23 24 25 | #import "OFIPSocketAsyncConnector.h" #import "OFData.h" #import "OFTCPSocket.h" #import "OFThread.h" #import "OFTimer.h" | | | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #import "OFIPSocketAsyncConnector.h" #import "OFData.h" #import "OFTCPSocket.h" #import "OFThread.h" #import "OFTimer.h" #import "OFConnectIPSocketFailedException.h" #import "OFInvalidFormatException.h" @implementation OFIPSocketAsyncConnector - (instancetype)initWithSocket: (id)sock host: (OFString *)host port: (uint16_t)port delegate: (id)delegate |
︙ | ︙ | |||
122 123 124 125 126 127 128 | } [self didConnect]; } - (id)of_connectionFailedExceptionForErrNo: (int)errNo { | | | | | | | | 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | } [self didConnect]; } - (id)of_connectionFailedExceptionForErrNo: (int)errNo { return [OFConnectIPSocketFailedException exceptionWithHost: _host port: _port socket: _socket errNo: errNo]; } - (void)tryNextAddressWithRunLoopMode: (OFRunLoopMode)runLoopMode { OFSocketAddress address = *(const OFSocketAddress *) [_socketAddresses itemAtIndex: _socketAddressesIndex++]; int errNo; OFSocketAddressSetIPPort(&address, _port); if (![_socket of_createSocketForAddress: &address errNo: &errNo]) { if (_socketAddressesIndex >= _socketAddresses.count) { _exception = [[OFConnectIPSocketFailedException alloc] initWithHost: _host port: _port socket: _socket errNo: errNo]; [self didConnect]; return; } |
︙ | ︙ | |||
183 184 185 186 187 188 189 | delegate: self]; return; } else { #endif [_socket of_closeSocket]; if (_socketAddressesIndex >= _socketAddresses.count) { | | | 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | delegate: self]; return; } else { #endif [_socket of_closeSocket]; if (_socketAddressesIndex >= _socketAddresses.count) { _exception = [[OFConnectIPSocketFailedException alloc] initWithHost: _host port: _port socket: _socket errNo: errNo]; [self didConnect]; return; } |
︙ | ︙ |