ObjFW  Diff

Differences From Artifact [1d2fee88b0]:

To Artifact [2ecd0e6700]:


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
87
88
89
90
91
92
93
94
-	  (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 which 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
 */







|







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
 */