ObjFW  Check-in [605fc10fad]

Overview
Comment:OFUDPSocket: More constness
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 605fc10fade97d03456fb1fc5f36a9c77556337f6ba8eafb40852ace12e3ab75
User & Date: js on 2015-09-14 13:50:21
Other Links: manifest | tags
Context
2015-09-17
21:19
Fix compilation for PSP check-in: 719ec38eb0 user: js tags: trunk
2015-09-14
13:50
OFUDPSocket: More constness check-in: 605fc10fad user: js tags: trunk
10:59
README-WINDOWS.md: Add a warning about MSYS2 Shell check-in: 5c033e468f user: js tags: trunk
Changes

Modified src/OFUDPSocket.h from [fa09b98560] to [322e298c3d].

235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
 * @param buffer The buffer to send as a datagram
 * @param length The length of the buffer
 * @param receiver A pointer to an @ref of_udp_socket_address_t to which the
 *		   datagram should be sent
 */
- (void)sendBuffer: (const void*)buffer
	    length: (size_t)length
	  receiver: (of_udp_socket_address_t*)receiver;

/*!
 * @brief Cancels all pending asyncronous requests on the socket.
 *
 * @warning You are not allowed to call this inside the handler of an
 *	    asyncronous request, as this would cancel the asyncronous request
 *	    that is currently being handled! To cancel all pending asyncronous







|







235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
 * @param buffer The buffer to send as a datagram
 * @param length The length of the buffer
 * @param receiver A pointer to an @ref of_udp_socket_address_t to which the
 *		   datagram should be sent
 */
- (void)sendBuffer: (const void*)buffer
	    length: (size_t)length
	  receiver: (const of_udp_socket_address_t*)receiver;

/*!
 * @brief Cancels all pending asyncronous requests on the socket.
 *
 * @warning You are not allowed to call this inside the handler of an
 *	    asyncronous request, as this would cancel the asyncronous request
 *	    that is currently being handled! To cancel all pending asyncronous

Modified src/OFUDPSocket.m from [c798b7ff61] to [b3ff5858a7].

521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
					   length: length
					    block: block];
}
#endif

- (void)sendBuffer: (const void*)buffer
	    length: (size_t)length
	  receiver: (of_udp_socket_address_t*)receiver
{
	if (_socket == INVALID_SOCKET)
		@throw [OFNotOpenException exceptionWithObject: self];

#ifndef _WIN32
	if (sendto(_socket, buffer, length, 0,
	    (struct sockaddr*)&receiver->address, receiver->length) < length)







|







521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
					   length: length
					    block: block];
}
#endif

- (void)sendBuffer: (const void*)buffer
	    length: (size_t)length
	  receiver: (const of_udp_socket_address_t*)receiver
{
	if (_socket == INVALID_SOCKET)
		@throw [OFNotOpenException exceptionWithObject: self];

#ifndef _WIN32
	if (sendto(_socket, buffer, length, 0,
	    (struct sockaddr*)&receiver->address, receiver->length) < length)