Skip to content

Commit

Permalink
Added comment about non-blocking behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
paullouisageneau authored and arvidn committed May 9, 2020
1 parent 351c41d commit 90abe78
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/libtorrent/aux_/utp_stream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ struct utp_socket_impl
void do_connect(tcp::endpoint const& ep);

std::size_t read_some(bool const clear_buffers);
std::size_t write_some(bool const clear_buffers);
std::size_t write_some(bool const clear_buffers); // Warning: non-blocking
int receive_buffer_size() const { return m_receive_buffer_size; }

bool null_buffers() const { return m_null_buffers; }
Expand Down
2 changes: 2 additions & 0 deletions src/utp_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,8 @@ std::size_t utp_stream::read_some(bool const clear_buffers)
return m_impl->read_some(clear_buffers);
}

// Warning: this is always non-blocking, it only tries to send
// immediately if there is some space in the congestion window.
std::size_t utp_stream::write_some(bool const clear_buffers)
{
return m_impl->write_some(clear_buffers);
Expand Down

0 comments on commit 90abe78

Please sign in to comment.