@@ -83,21 +83,20 @@ OF_ENSURE(0); } else { #endif if ([_delegate respondsToSelector: @selector(socket:didConnectToHost:port:exception:)]) - [_delegate socket: _socket + [_delegate socket: _socket didConnectToHost: _host port: _port exception: _exception]; #ifdef OF_HAVE_BLOCKS } #endif } -- (void)of_socketDidConnect: (id)sock - exception: (id)exception +- (void)of_socketDidConnect: (id)sock exception: (id)exception { if (exception != nil) { /* * self might be retained only by the pending async requests, * which we're about to cancel. @@ -123,12 +122,11 @@ timerWithTimeInterval: 0 target: self selector: selector object: runLoop.currentMode repeats: false]; - [runLoop addTimer: timer - forMode: runLoop.currentMode]; + [runLoop addTimer: timer forMode: runLoop.currentMode]; } return; } @@ -149,12 +147,11 @@ [_socketAddresses itemAtIndex: _socketAddressesIndex++]; int errNo; of_socket_address_set_port(&address, _port); - if (![_socket of_createSocketForAddress: &address - errNo: &errNo]) { + if (![_socket of_createSocketForAddress: &address errNo: &errNo]) { if (_socketAddressesIndex >= _socketAddresses.count) { _exception = [[OFConnectionFailedException alloc] initWithHost: _host port: _port socket: _socket @@ -181,12 +178,11 @@ [_socket setCanBlock: true]; #else [_socket setCanBlock: false]; #endif - if (![_socket of_connectSocketToAddress: &address - errNo: &errNo]) { + if (![_socket of_connectSocketToAddress: &address errNo: &errNo]) { #if !defined(OF_NINTENDO_3DS) && !defined(OF_WII) if (errNo == EINPROGRESS) { [OFRunLoop of_addAsyncConnectForSocket: _socket mode: runLoopMode delegate: self];