mirror of
				https://github.com/zeromq/cppzmq.git
				synced 2025-10-29 20:59:47 +01:00 
			
		
		
		
	Suppport for raw arrays in send_multipart
This commit is contained in:
		| @@ -96,8 +96,10 @@ template<class Range, | |||||||
| detail::send_result_t send_multipart(socket_ref s, Range&& msgs, | detail::send_result_t send_multipart(socket_ref s, Range&& msgs, | ||||||
|                                        send_flags flags = send_flags::none) |                                        send_flags flags = send_flags::none) | ||||||
| { | { | ||||||
|     auto it = msgs.begin(); |     using std::begin; | ||||||
|     const auto end_it = msgs.end(); |     using std::end; | ||||||
|  |     auto it = begin(msgs); | ||||||
|  |     const auto end_it = end(msgs); | ||||||
|     size_t msg_count = 0; |     size_t msg_count = 0; | ||||||
|     while (it != end_it) |     while (it != end_it) | ||||||
|     { |     { | ||||||
| @@ -106,7 +108,7 @@ detail::send_result_t send_multipart(socket_ref s, Range&& msgs, | |||||||
|         if (!s.send(*it, msg_flags)) |         if (!s.send(*it, msg_flags)) | ||||||
|         { |         { | ||||||
|             // zmq ensures atomic delivery of messages |             // zmq ensures atomic delivery of messages | ||||||
|             assert(it == msgs.begin()); |             assert(it == begin(msgs)); | ||||||
|             return {}; |             return {}; | ||||||
|         } |         } | ||||||
|         ++msg_count; |         ++msg_count; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Gudmundur Adalsteinsson
					Gudmundur Adalsteinsson