@@ -187,6 +187,11 @@ struct TORRENT_EXTRA_EXPORT utp_stream
187
187
using endpoint_type = tcp::socket::endpoint_type;
188
188
using protocol_type = tcp::socket::protocol_type;
189
189
190
+ #if BOOST_VERSION >= 106600
191
+ typedef tcp::socket::executor_type executor_type;
192
+ executor_type get_executor () { return m_io_service.get_executor (); }
193
+ #endif
194
+
190
195
explicit utp_stream (io_service& io_service);
191
196
~utp_stream ();
192
197
utp_stream& operator =(utp_stream const &) = delete ;
@@ -208,6 +213,12 @@ struct TORRENT_EXTRA_EXPORT utp_stream
208
213
template <class IO_Control_Command >
209
214
void io_control (IO_Control_Command&, error_code&) {}
210
215
216
+ #ifndef BOOST_NO_EXCEPTIONS
217
+ void non_blocking (bool ) {}
218
+ #endif
219
+
220
+ error_code non_blocking (bool , error_code&) { return error_code (); }
221
+
211
222
#ifndef BOOST_NO_EXCEPTIONS
212
223
void bind (endpoint_type const & /* endpoint*/ ) {}
213
224
#endif
@@ -320,8 +331,13 @@ struct TORRENT_EXTRA_EXPORT utp_stream
320
331
return ;
321
332
}
322
333
std::size_t bytes_added = 0 ;
334
+ #if BOOST_VERSION >= 106600
335
+ for (auto i = buffer_sequence_begin (buffers)
336
+ , end (buffer_sequence_end (buffers)); i != end; ++i)
337
+ #else
323
338
for (typename Mutable_Buffers::const_iterator i = buffers.begin ()
324
339
, end (buffers.end ()); i != end; ++i)
340
+ #endif
325
341
{
326
342
if (buffer_size (*i) == 0 ) continue ;
327
343
using boost::asio::buffer_cast;
@@ -391,8 +407,13 @@ struct TORRENT_EXTRA_EXPORT utp_stream
391
407
size_t buf_size = 0 ;
392
408
#endif
393
409
410
+ #if BOOST_VERSION >= 106600
411
+ for (auto i = buffer_sequence_begin (buffers)
412
+ , end (buffer_sequence_end (buffers)); i != end; ++i)
413
+ #else
394
414
for (typename Mutable_Buffers::const_iterator i = buffers.begin ()
395
415
, end (buffers.end ()); i != end; ++i)
416
+ #endif
396
417
{
397
418
using boost::asio::buffer_cast;
398
419
using boost::asio::buffer_size;
@@ -456,8 +477,13 @@ struct TORRENT_EXTRA_EXPORT utp_stream
456
477
}
457
478
458
479
std::size_t bytes_added = 0 ;
480
+ #if BOOST_VERSION >= 106600
481
+ for (auto i = buffer_sequence_begin (buffers)
482
+ , end (buffer_sequence_end (buffers)); i != end; ++i)
483
+ #else
459
484
for (typename Const_Buffers::const_iterator i = buffers.begin ()
460
485
, end (buffers.end ()); i != end; ++i)
486
+ #endif
461
487
{
462
488
if (buffer_size (*i) == 0 ) continue ;
463
489
using boost::asio::buffer_cast;
0 commit comments