@@ -15,23 +15,23 @@ #include "config.h" #include -#import "OFIPSocketAsyncConnector.h" +#import "OFAsyncIPSocketConnector.h" #import "OFData.h" #ifdef OF_HAVE_SCTP # import "OFSCTPSocket.h" #endif #import "OFTCPSocket.h" #import "OFThread.h" #import "OFTimer.h" -#import "OFConnectionFailedException.h" +#import "OFConnectIPSocketFailedException.h" #import "OFInvalidFormatException.h" -@implementation OFIPSocketAsyncConnector +@implementation OFAsyncIPSocketConnector - (instancetype)initWithSocket: (id)sock host: (OFString *)host port: (uint16_t)port delegate: (id)delegate block: (id)block @@ -131,27 +131,27 @@ [self didConnect]; } - (id)of_connectionFailedExceptionForErrNo: (int)errNo { - return [OFConnectionFailedException exceptionWithHost: _host - port: _port - socket: _socket - errNo: errNo]; + return [OFConnectIPSocketFailedException exceptionWithHost: _host + port: _port + socket: _socket + errNo: errNo]; } - (void)tryNextAddressWithRunLoopMode: (OFRunLoopMode)runLoopMode { OFSocketAddress address = *(const OFSocketAddress *) [_socketAddresses itemAtIndex: _socketAddressesIndex++]; int errNo; - OFSocketAddressSetPort(&address, _port); + OFSocketAddressSetIPPort(&address, _port); if (![_socket of_createSocketForAddress: &address errNo: &errNo]) { if (_socketAddressesIndex >= _socketAddresses.count) { - _exception = [[OFConnectionFailedException alloc] + _exception = [[OFConnectIPSocketFailedException alloc] initWithHost: _host port: _port socket: _socket errNo: errNo]; [self didConnect]; @@ -192,11 +192,11 @@ } else { #endif [_socket of_closeSocket]; if (_socketAddressesIndex >= _socketAddresses.count) { - _exception = [[OFConnectionFailedException + _exception = [[OFConnectIPSocketFailedException alloc] initWithHost: _host port: _port socket: _socket errNo: errNo]; [self didConnect];