72
73
74
75
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
|
* @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
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 UDP socket which sent a packet
* @param data The data which was sent
* @param receiver The receiver for the UDP 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
*/
- (nullable OFData *)socket: (OF_KINDOF(OFUDPSocket *))socket
didSendData: (OFData *)data
receiver: (const of_socket_address_t *_Nonnull)receiver
exception: (nullable id)exception;
@end
/*!
* @class OFUDPSocket OFUDPSocket.h ObjFW/OFUDPSocket.h
|
|
|
|
72
73
74
75
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
|
* @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: (OFUDPSocket *)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 UDP socket which sent a packet
* @param data The data which was sent
* @param receiver The receiver for the UDP 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
*/
- (nullable OFData *)socket: (OFUDPSocket *)socket
didSendData: (OFData *)data
receiver: (const of_socket_address_t *_Nonnull)receiver
exception: (nullable id)exception;
@end
/*!
* @class OFUDPSocket OFUDPSocket.h ObjFW/OFUDPSocket.h
|