@@ -33,11 +33,11 @@ * @param length The length of the packet * @param exception An exception which occurred while receiving or `nil` on * success * @return A bool whether the same block should be used for the next receive */ -typedef bool (^of_sequenced_packet_socket_async_receive_block_t)(size_t length, +typedef bool (^OFSequencedPacketSocketAsyncReceiveBlock)(size_t length, id _Nullable exception); /** * @brief A block which is called when a packet has been sent. * @@ -44,11 +44,11 @@ * @param data The data which was sent * @param exception An exception which occurred while reading or `nil` on * success * @return The data to repeat the send with or nil if it should not repeat */ -typedef OFData *_Nullable (^of_sequenced_packet_socket_async_send_data_block_t)( +typedef OFData *_Nullable (^OFSequencedPacketSocketAsyncSendDataBlock)( OFData *_Nonnull data, id _Nullable exception); /** * @brief A block which is called when the socket accepted a connection. * @@ -56,11 +56,11 @@ * @param exception An exception which occurred while accepting the socket or * `nil` on success * @return A bool whether the same block should be used for the next incoming * connection */ -typedef bool (^of_sequenced_packet_socket_async_accept_block_t)( +typedef bool (^OFSequencedPacketSocketAsyncAcceptBlock)( OFSequencedPacketSocket *acceptedSocket, id _Nullable exception); #endif /** * @protocol OFSequencedPacketSocketDelegate OFSequencedPacketSocket.h \ @@ -218,15 +218,13 @@ * block returns true, it will be called again with the same * buffer and maximum length when more packets have been received. * If you want the next method in the queue to handle the packet * received next, you need to return false from the method. */ -- (void) - asyncReceiveIntoBuffer: (void *)buffer - length: (size_t)length - block: (of_sequenced_packet_socket_async_receive_block_t) - block; +- (void)asyncReceiveIntoBuffer: (void *)buffer + length: (size_t)length + block: (OFSequencedPacketSocketAsyncReceiveBlock)block; /** * @brief Asynchronously receives a packet and stores it into the specified * buffer. * @@ -239,16 +237,14 @@ * block returns true, it will be called again with the same * buffer and maximum length when more packets have been received. * If you want the next method in the queue to handle the packet * received next, you need to return false from the method. */ -- (void) - asyncReceiveIntoBuffer: (void *)buffer - length: (size_t)length - runLoopMode: (of_run_loop_mode_t)runLoopMode - block: (of_sequenced_packet_socket_async_receive_block_t) - block; +- (void)asyncReceiveIntoBuffer: (void *)buffer + length: (size_t)length + runLoopMode: (of_run_loop_mode_t)runLoopMode + block: (OFSequencedPacketSocketAsyncReceiveBlock)block; #endif /** * @brief Sends the specified packet. * @@ -281,12 +277,11 @@ * @param block The block to call when the packet has been sent. It should * return the data for the next send with the same callback or nil * if it should not repeat. */ - (void)asyncSendData: (OFData *)data - block: (of_sequenced_packet_socket_async_send_data_block_t) - block; + block: (OFSequencedPacketSocketAsyncSendDataBlock)block; /** * @brief Asynchronously sends the specified packet. * * @param data The data to send as a packet @@ -295,12 +290,11 @@ * return the data for the next send with the same callback or nil * if it should not repeat. */ - (void)asyncSendData: (OFData *)data runLoopMode: (of_run_loop_mode_t)runLoopMode - block: (of_sequenced_packet_socket_async_send_data_block_t) - block; + block: (OFSequencedPacketSocketAsyncSendDataBlock)block; #endif /** * @brief Listen on the socket. * @@ -338,23 +332,23 @@ * * @param block The block to execute when a new connection has been accepted. * Returns whether the next incoming connection should be accepted * by the specified block as well. */ -- (void)asyncAcceptWithBlock: - (of_sequenced_packet_socket_async_accept_block_t)block; +- (void)asyncAcceptWithBlock: (OFSequencedPacketSocketAsyncAcceptBlock)block; /** * @brief Asynchronously accept an incoming connection. * * @param runLoopMode The run loop mode in which to perform the async accept * @param block The block to execute when a new connection has been accepted. * Returns whether the next incoming connection should be accepted * by the specified block as well. */ -- (void)asyncAcceptWithRunLoopMode: (of_run_loop_mode_t)runLoopMode - block: (of_sequenced_packet_socket_async_accept_block_t)block; +- (void) + asyncAcceptWithRunLoopMode: (of_run_loop_mode_t)runLoopMode + block: (OFSequencedPacketSocketAsyncAcceptBlock)block; #endif /** * @brief Cancels all pending asynchronous requests on the socket. */