Added fr::Socket::has_data to check if recv buffer is empty
If using a SocketSelector, you should keep accepting data from the socket until has_data returns false, indicating that you've read everything.
This commit is contained in:
@@ -168,6 +168,11 @@ namespace fr
|
||||
is_connected = true;
|
||||
ssl_socket_descriptor = std::move(context);
|
||||
}
|
||||
|
||||
bool SSLSocket::has_data() const
|
||||
{
|
||||
return !unprocessed_buffer.empty();
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user