How to achieve data read timeout on local::stream_protocol::socket
- Ngôn ngữ chính
- HTML
- Star
- 8.6k
- Fork
- 1.9k
- Merge trung bình
- 39 phút
- Pull request đã merge (30 ngày)
- 2
Mô tả
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();
}
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.