@@ -50,11 +50,11 @@ * @param exception An exception that occurred while connecting, or nil on * success */ - (void)socket: (OFSPXSocket *)socket didConnectToNetwork: (uint32_t)network - node: (unsigned char [_Nonnull IPX_NODE_LEN])node + node: (const unsigned char [_Nonnull IPX_NODE_LEN])node port: (uint16_t)port exception: (nullable id)exception; @end /** @@ -91,11 +91,11 @@ * connect to * @throw OFConnectionFailedException Connecting failed * @throw OFAlreadyConnectedException The socket is already connected or bound */ - (void)connectToNetwork: (uint32_t)network - node: (unsigned char [_Nonnull IPX_NODE_LEN])node + node: (const unsigned char [_Nonnull IPX_NODE_LEN])node port: (uint16_t)port; /** * @brief Asynchronously connect the OFSPXSocket to the specified destination. * @@ -103,11 +103,11 @@ * @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 + node: (const unsigned char [_Nonnull IPX_NODE_LEN])node port: (uint16_t)port; /** * @brief Asynchronously connect the OFSPXSocket to the specified destination. * @@ -116,11 +116,11 @@ * @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 + node: (const unsigned char [_Nonnull IPX_NODE_LEN])node port: (uint16_t)port runLoopMode: (OFRunLoopMode)runLoopMode; #ifdef OF_HAVE_BLOCKS /** @@ -131,11 +131,11 @@ * @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)asyncConnectToNetwork: (uint32_t)network - node: (unsigned char [_Nonnull IPX_NODE_LEN])node + node: (const unsigned char [_Nonnull IPX_NODE_LEN])node port: (uint16_t)port block: (OFSPXSocketAsyncConnectBlock)block; /** * @brief Asynchronously connect the OFSPXSocket to the specified destination. @@ -146,24 +146,30 @@ * 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)asyncConnectToNetwork: (uint32_t)network - node: (unsigned char [_Nonnull IPX_NODE_LEN])node + node: (const unsigned char [_Nonnull IPX_NODE_LEN])node port: (uint16_t)port runLoopMode: (OFRunLoopMode)runLoopMode block: (OFSPXSocketAsyncConnectBlock)block; #endif /** * @brief Bind the socket to the specified network, node and port. * + * @param network The IPX network to bind to. 0 means the current network. + * @param node The IPX network to bind to. An all zero node means the + * computer's node. * @param port The port (sometimes called socket number) to bind to. 0 means to * pick one and return via the returned socket address. * @return The address on which this socket can be reached * @throw OFBindIPXSocketFailedException Binding failed * @throw OFAlreadyConnectedException The socket is already connected or bound */ -- (OFSocketAddress)bindToPort: (uint16_t)port; +- (OFSocketAddress) + bindToNetwork: (uint32_t)network + node: (const unsigned char [_Nonnull IPX_NODE_LEN])node + port: (uint16_t)port; @end OF_ASSUME_NONNULL_END