How to achieve data read timeout on local::stream_protocol::socket
- Dominant language
- HTML
- Stars
- 8.6k
- Forks
- 1.9k
- Avg merge
- 39m
- Merged PRs (30d)
- 2
Description
Basically i am using async_wait with wait_read flag to read data on socket when socket is ready for read.
but this async_wait waits forever with wait_read flag if there is no data on socket.
i wanted to have a timeout for this async_wait operation on local::stream_protocol::socket
stream_protocol::socket unixSocket;
this->unixSocket.async_wait(
stream_protocol::socket::wait_read,
[this, self(shared_from_this())](boost::system::error_code ec) {
if (ec)
{
this->connection->close();
return;
}
doReadDataOnSocket();
}
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.