So, StreamFdMessageReader was designed to read one message from an FD. It
doesn't really have any way to say "try to read a message, but let me know
if it's EOF".
Things you could do instead:
- Use poll() to check for POLLHUP before constructing
StreamFdMessageReader. If POLLHUP is indicated, use
Hi,
I use capnp::StreamFdMessageReader(fd) to read a message on a file
descriptor created using network sockets.
And it works fine. However, I'm trying to detect if the client socket has
closed. Normally, if a read() call returns 0, this would show the client
connection has closed.
How would