boostorg / boostorg/boost

How to achieve data read timeout on local::stream_protocol::socket

Đang mở
#443 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
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á.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.