@@ -1,7 +1,7 @@ /* - * Copyright (c) 2008-2021 Jonathan Schleifer + * Copyright (c) 2008-2022 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 @@ -43,21 +43,21 @@ @optional /** * @brief A method which is called when a socket connected. * * @param socket The socket which connected - * @param node The node the socket connected to * @param network The network of the node the socket connected to + * @param node The node the socket connected to * @param port The port of the node to which the socket connected * @param exception An exception that occurred while connecting, or nil on * success */ -- (void)socket: (OFSPXStreamSocket *)socket - didConnectToNode: (unsigned char [_Nonnull IPX_NODE_LEN])node - network: (uint32_t)network - port: (uint16_t)port - exception: (nullable id)exception; +- (void)socket: (OFSPXStreamSocket *)socket + didConnectToNetwork: (uint32_t)network + node: (unsigned char [_Nonnull IPX_NODE_LEN])node + port: (uint16_t)port + exception: (nullable id)exception; @end /** * @class OFSPXStreamSocket OFSPXStreamSocket.h ObjFW/OFSPXStreamSocket.h * @@ -84,79 +84,79 @@ id delegate; /** * @brief Connect the OFSPXStreamSocket to the specified destination. * - * @param node The node to connect to - * @param network The network on which the node to connect to is - * @param port The port (sometimes also called socket number) on the node to - * connect to - */ -- (void)connectToNode: (unsigned char [_Nonnull IPX_NODE_LEN])node - network: (uint32_t)network - port: (uint16_t)port; - -/** - * @brief Asynchronously connect the OFSPXStreamSocket to the specified - * destination. - * - * @param node The node to connect to - * @param network The network on which the node to connect to is - * @param port The port (sometimes also called socket number) on the node to - * connect to - */ -- (void)asyncConnectToNode: (unsigned char [_Nonnull IPX_NODE_LEN])node - network: (uint32_t)network - port: (uint16_t)port; - -/** - * @brief Asynchronously connect the OFSPXStreamSocket to the specified - * destination. - * - * @param node The node to connect to - * @param network The network on which the node to connect to is - * @param port The port (sometimes also called socket number) on the node to - * connect to - * @param runLoopMode The run loop mode in which to perform the async connect - */ -- (void)asyncConnectToNode: (unsigned char [_Nonnull IPX_NODE_LEN])node - network: (uint32_t)network - port: (uint16_t)port - runLoopMode: (OFRunLoopMode)runLoopMode; + * @param network The network on which the node to connect to is + * @param node The node to connect to + * @param port The port (sometimes also called socket number) on the node to + * connect to + */ +- (void)connectToNetwork: (uint32_t)network + node: (unsigned char [_Nonnull IPX_NODE_LEN])node + port: (uint16_t)port; + +/** + * @brief Asynchronously connect the OFSPXStreamSocket to the specified + * destination. + * + * @param network The network on which the node to connect to is + * @param node The node to connect to + * @param port The port (sometimes also called socket number) on the node to + * connect to + */ +- (void)asyncConnectToNetwork: (uint32_t)network + node: (unsigned char [_Nonnull IPX_NODE_LEN])node + port: (uint16_t)port; + +/** + * @brief Asynchronously connect the OFSPXStreamSocket to the specified + * destination. + * + * @param network The network on which the node to connect to is + * @param node The node to connect to + * @param port The port (sometimes also called socket number) on the node to + * connect to + * @param runLoopMode The run loop mode in which to perform the async connect + */ +- (void)asyncConnectToNetwork: (uint32_t)network + node: (unsigned char [_Nonnull IPX_NODE_LEN])node + port: (uint16_t)port + runLoopMode: (OFRunLoopMode)runLoopMode; #ifdef OF_HAVE_BLOCKS /** * @brief Asynchronously connect the OFSPXStreamSocket to the specified * destination. * - * @param node The node to connect to * @param network The network on which the node to connect to is + * @param node The node to connect to * @param port The port (sometimes also called socket number) on the node to * connect to * @param block The block to execute once the connection has been established */ -- (void)asyncConnectToNode: (unsigned char [_Nonnull IPX_NODE_LEN])node - network: (uint32_t)network - port: (uint16_t)port - block: (OFSPXStreamSocketAsyncConnectBlock)block; +- (void)asyncConnectToNetwork: (uint32_t)network + node: (unsigned char [_Nonnull IPX_NODE_LEN])node + port: (uint16_t)port + block: (OFSPXStreamSocketAsyncConnectBlock)block; /** * @brief Asynchronously connect the OFSPXStreamSocket to the specified * destination. * - * @param node The node to connect to * @param network The network on which the node to connect to is + * @param node The node to connect to * @param port The port (sometimes also called socket number) on the node to * connect to * @param runLoopMode The run loop mode in which to perform the async connect * @param block The block to execute once the connection has been established */ -- (void)asyncConnectToNode: (unsigned char [_Nonnull IPX_NODE_LEN])node - network: (uint32_t)network - port: (uint16_t)port - runLoopMode: (OFRunLoopMode)runLoopMode - block: (OFSPXStreamSocketAsyncConnectBlock)block; +- (void)asyncConnectToNetwork: (uint32_t)network + node: (unsigned char [_Nonnull IPX_NODE_LEN])node + port: (uint16_t)port + runLoopMode: (OFRunLoopMode)runLoopMode + block: (OFSPXStreamSocketAsyncConnectBlock)block; #endif /** * @brief Bind the socket to the specified network, node and port. *