@@ -180,12 +180,11 @@ { closesocket(_socket); _socket = INVALID_SOCKET; } -- (void)connectToHost: (OFString *)host - port: (uint16_t)port +- (void)connectToHost: (OFString *)host port: (uint16_t)port { void *pool = objc_autoreleasePoolPush(); id delegate = _delegate; OFTCPSocketConnectDelegate *connectDelegate = [[[OFTCPSocketConnectDelegate alloc] init] autorelease]; @@ -195,27 +194,24 @@ [self asyncConnectToHost: host port: port runLoopMode: connectRunLoopMode]; while (!connectDelegate->_done) - [runLoop runMode: connectRunLoopMode - beforeDate: nil]; + [runLoop runMode: connectRunLoopMode beforeDate: nil]; /* Cleanup */ - [runLoop runMode: connectRunLoopMode - beforeDate: [OFDate date]]; + [runLoop runMode: connectRunLoopMode beforeDate: [OFDate date]]; if (connectDelegate->_exception != nil) @throw connectDelegate->_exception; self.delegate = delegate; objc_autoreleasePoolPop(pool); } -- (void)asyncConnectToHost: (OFString *)host - port: (uint16_t)port +- (void)asyncConnectToHost: (OFString *)host port: (uint16_t)port { [self asyncConnectToHost: host port: port runLoopMode: of_run_loop_mode_default]; } @@ -299,12 +295,11 @@ objc_autoreleasePoolPop(pool); } #endif -- (uint16_t)bindToHost: (OFString *)host - port: (uint16_t)port +- (uint16_t)bindToHost: (OFString *)host port: (uint16_t)port { const int one = 1; void *pool = objc_autoreleasePoolPush(); OFData *socketAddresses; of_socket_address_t address;