5#ifndef BITCOIN_UTIL_TOKENPIPE_H
6#define BITCOIN_UTIL_TOKENPIPE_H
88 static std::optional<TokenPipe>
Make();
107 for (
int i = 0; i < 2; ++i) {
108 m_fds[i] = other.m_fds[i];
115 for (
int i = 0; i < 2; ++i) {
116 m_fds[i] = other.m_fds[i];
TokenPipeEnd & operator=(TokenPipeEnd &&other)
TokenPipeEnd(const TokenPipeEnd &)=delete
TokenPipeEnd(TokenPipeEnd &&other)
Status
Return value constants for TokenWrite and TokenRead.
@ TS_EOS
Unexpected end of stream.
bool IsOpen()
Return whether endpoint is open.
int TokenWrite(uint8_t token)
Write token to endpoint.
void Close()
Explicit close function.
TokenPipeEnd & operator=(const TokenPipeEnd &)=delete
int TokenRead()
Read token from endpoint.
An interprocess or interthread pipe for sending tokens (one-byte values) over.
void Close()
Close and end of the pipe that hasn't been moved out.
TokenPipeEnd TakeReadEnd()
Take the read end of this pipe.
TokenPipeEnd TakeWriteEnd()
Take the write end of this pipe.
static std::optional< TokenPipe > Make()
Create a new pipe.
TokenPipe & operator=(TokenPipe &&other)
TokenPipe & operator=(const TokenPipe &)=delete
TokenPipe(TokenPipe &&other)
TokenPipe(const TokenPipe &)=delete