Differences From Artifact [c46ceeaf1d]:
- File
src/OFSequencedPacketSocket.h
— part of check-in
[e5b2ee56ff]
at
2020-04-26 16:21:38
on branch trunk
— Add OFSequencedPacketSocket
This is intended for SCTP and SPX. (user: js, size: 12196) [annotate] [blame] [check-ins using]
To Artifact [a59d130a79]:
- File
src/OFSequencedPacketSocket.h
— part of check-in
[d7ddb3dbc7]
at
2020-04-26 19:39:06
on branch trunk
— Remove redundant arguments from blocks
Arguments that can just be captured by the block don't need to be
repeated as an argument. A lot of arguments passed to a delegate are
therefore not needed for a block. (user: js, size: 11792) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
28 29 30 31 32 33 34 | @class OFData; @class OFSequencedPacketSocket; #ifdef OF_HAVE_BLOCKS /*! * @brief A block which is called when a packet has been received. * | < < | < | < < | < | < | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | @class OFData; @class OFSequencedPacketSocket; #ifdef OF_HAVE_BLOCKS /*! * @brief A block which is called when a packet has been received. * * @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, id _Nullable exception); /*! * @brief A block which is called when a packet has been sent. * * @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)( OFData *_Nonnull data, id _Nullable exception); /*! * @brief A block which is called when the socket accepted a connection. * * @param acceptedSocket The socket which has been accepted * @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)( OFSequencedPacketSocket *acceptedSocket, id _Nullable exception); #endif /*! * @protocol OFSequencedPacketSocketDelegate OFSequencedPacketSocket.h \ * ObjFW/OFSequencedPacketSocket.h * * @brief A delegate for OFSequencedPacketSocket. |
︙ | ︙ |