Differences From Artifact [1d2fee88b0]:
- File
src/OFDatagramSocket.h
— part of check-in
[b02c4b05bb]
at
2020-04-25 17:05:13
on branch trunk
— Add OFDatagramSocket as base class for OFUDPSocket
This makes it easier to reuse code for other datagram sockets, namely
IPX. (user: js, size: 10625) [annotate] [blame] [check-ins using]
To Artifact [2ecd0e6700]:
- File src/OFDatagramSocket.h — part of check-in [4a5822e7c0] at 2020-04-25 23:02:16 on branch trunk — Add OFIPXSocket (user: js, size: 10641) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #import "socket.h" OF_ASSUME_NONNULL_BEGIN /*! @file */ @class OFDatagramSocket; #ifdef OF_HAVE_BLOCKS /*! * @brief A block which is called when a packet has been received. * * @param socket The datagram socket which received a packet | > | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | #import "socket.h" OF_ASSUME_NONNULL_BEGIN /*! @file */ @class OFData; @class OFDatagramSocket; #ifdef OF_HAVE_BLOCKS /*! * @brief A block which is called when a packet has been received. * * @param socket The datagram socket which received a packet |
︙ | ︙ | |||
80 81 82 83 84 85 86 | - (bool)socket: (OFDatagramSocket *)socket didReceiveIntoBuffer: (void *)buffer length: (size_t)length sender: (const of_socket_address_t *_Nonnull)sender exception: (nullable id)exception; /*! | | | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | - (bool)socket: (OFDatagramSocket *)socket didReceiveIntoBuffer: (void *)buffer length: (size_t)length sender: (const of_socket_address_t *_Nonnull)sender exception: (nullable id)exception; /*! * @brief This method is called when a packet has been sent. * * @param socket The datagram socket which sent a packet * @param data The data which was sent * @param receiver The receiver for the packet * @param exception An exception that occurred while sending, or nil on success * @return The data to repeat the send with or nil if it should not repeat */ |
︙ | ︙ |