ObjFW  Diff

Differences From Artifact [05fb60ba2c]:

To Artifact [dea0dfc05e]:


123
124
125
126
127
128
129
130


131
132
133
134
135


136
137
138
139
140
141
142
123
124
125
126
127
128
129

130
131
132
133
134
135

136
137
138
139
140
141
142
143
144







-
+
+




-
+
+







 *
 * @param host The host to resolve
 * @param port The port for the resulting address
 * @param target The target on which to call the selector once the host has been
 *		 resolved
 * @param selector The selector to call on the target. The signature must be
 *		   `void (OFString *host, uint16_t port,
 *		   of_udp_socket_address_t address, OFException *exception)`.
 *		   of_udp_socket_address_t address, id context,
 *		   OFException *exception)`.
 */
+ (void)asyncResolveAddressForHost: (OFString *)host
			      port: (uint16_t)port
			    target: (id)target
			  selector: (SEL)selector;
			  selector: (SEL)selector
			   context: (nullable id)context;

# ifdef OF_HAVE_BLOCKS
/*!
 * @brief Asynchronously resolves the specified host and creates an address for
 *	  the host / port pair.
 *
 * @param host The host to resolve
201
202
203
204
205
206
207
208


209
210
211
212
213


214
215
216
217
218
219
220
203
204
205
206
207
208
209

210
211
212
213
214
215

216
217
218
219
220
221
222
223
224







-
+
+




-
+
+







 *		 datagram has been received. If the method returns true, it
 *		 will be called again with the same buffer and maximum length
 *		 when more datagrams have been received. If you want the next
 *		 method in the queue to handle the datagram received next, you
 *		 need to return false from the method.
 * @param selector The selector to call on the target. The signature must be
 *		   `bool (OFUDPSocket *socket, void *buffer, size_t length,
 *		   of_udp_socket_address_t, OFException *exception)`.
 *		   of_udp_socket_address_t, id context,
 *		   OFException *exception)`.
 */
- (void)asyncReceiveIntoBuffer: (void *)buffer
			length: (size_t)length
			target: (id)target
		      selector: (SEL)selector;
		      selector: (SEL)selector
		       context: (nullable id)context;

#ifdef OF_HAVE_BLOCKS
/*!
 * @brief Asynchronously receives a datagram and stores it into the specified
 *	  buffer.
 *
 * If the buffer is too small, the datagram is truncated.