Differences From Artifact [6654ade8b5]:
- File src/OFUDPSocket.h — part of check-in [da2dd2dde5] at 2018-12-08 18:55:26 on branch trunk — OFUDPSocket: Use a delegate for async operations (user: js, size: 13264) [annotate] [blame] [check-ins using]
To Artifact [ab6554e3b4]:
- File
src/OFUDPSocket.h
— part of check-in
[064dbe5127]
at
2018-12-11 22:57:46
on branch trunk
— Include an exception in delegate methods
Otherwise, there would be two methods for every operation: One for
success and one for failure. It also makes it easy to forget about
handling failure, so it's better to always pass an optional exception. (user: js, size: 12830) [annotate] [blame] [check-ins using]
︙ | |||
76 77 78 79 80 81 82 83 84 85 86 87 | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | + + - + + + - - + + - - - - - - - - - - - - - - - - - - - | /*! * @brief This method is called when a packet has been received. * * @param socket The UDP socket which received a packet * @param buffer The buffer the packet has been written to * @param length The length of the packet * @param sender The address of the sender of the packet * @param exception An exception that occurred while receiving, or nil on * success * @return A bool whether the same block should be used for the next receive */ - (bool)socket: (OF_KINDOF(OFUDPSocket *))socket didReceiveIntoBuffer: (void *)buffer length: (size_t)length |
︙ |