6 #if defined(HAVE_CONFIG_H) 43 ssize_t result = write(
m_fd, &token, 1);
50 }
else if (result == 0) {
62 ssize_t result = read(
m_fd, &token, 1);
69 }
else if (result == 0) {
86 int fds[2] = {-1, -1};
87 #if HAVE_O_CLOEXEC && HAVE_DECL_PIPE2 88 if (pipe2(fds, O_CLOEXEC) != 0) {
void Close()
Explicit close function.
int TokenWrite(uint8_t token)
Write token to endpoint.
int TokenRead()
Read token from endpoint.
void Close()
Close and end of the pipe that hasn't been moved out.
TokenPipeEnd TakeReadEnd()
Take the read end of this pipe.
static std::optional< TokenPipe > Make()
Create a new pipe.
TokenPipeEnd TakeWriteEnd()
Take the write end of this pipe.
Unexpected end of stream.