@@ -1,9 +1,7 @@ /* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, - * 2018, 2019, 2020 - * Jonathan Schleifer + * Copyright (c) 2008-2021 Jonathan Schleifer * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in @@ -77,21 +75,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. @@ -117,12 +114,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; } @@ -143,12 +139,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 @@ -175,12 +170,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];