chriskohlhoff / asio

Asio C++ Library
http://think-async.com/Asio
4.85k stars 1.21k forks source link

Basic Stream Socket bytes_readable #1177

Open echen333 opened 1 year ago

echen333 commented 1 year ago

I noticed from the basic_stream_socket that there is types of bytes_readable and the function available.

The documentation states available() returns the number of bytes that may be read without blocking. Does this refer to all bytes that are currently unread/unprocessed? Or does deal with the SYN Queue and Accept Queue, and if so, does .available() get the number of bytes readable from the SYN queue or the Accept queue?