boostorg / boostorg/boost

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

Ouverte
#443 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
HTML
Étoiles
8.6k
Forks
1.9k
Merge moyen
39 min
PR mergées (30 j)
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();
}

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.