Bitcoin ABC 0.30.3
P2P Digital Currency
|
An interprocess or interthread pipe for sending tokens (one-byte values) over. More...
#include <tokenpipe.h>
Public Member Functions | |
~TokenPipe () | |
TokenPipeEnd | TakeReadEnd () |
Take the read end of this pipe. More... | |
TokenPipeEnd | TakeWriteEnd () |
Take the write end of this pipe. More... | |
void | Close () |
Close and end of the pipe that hasn't been moved out. More... | |
TokenPipe (TokenPipe &&other) | |
TokenPipe & | operator= (TokenPipe &&other) |
TokenPipe (const TokenPipe &)=delete | |
TokenPipe & | operator= (const TokenPipe &)=delete |
Static Public Member Functions | |
static std::optional< TokenPipe > | Make () |
Create a new pipe. More... | |
Private Member Functions | |
TokenPipe (int fds[2]) | |
Private Attributes | |
int | m_fds [2] = {-1, -1} |
An interprocess or interthread pipe for sending tokens (one-byte values) over.
Definition at line 75 of file tokenpipe.h.
|
inlineprivate |
TokenPipe::~TokenPipe | ( | ) |
|
inline |
Definition at line 109 of file tokenpipe.h.
|
delete |
void TokenPipe::Close | ( | ) |
Close and end of the pipe that hasn't been moved out.
Definition at line 93 of file tokenpipe.cpp.
|
static |
Create a new pipe.
Definition at line 75 of file tokenpipe.cpp.
TokenPipeEnd TokenPipe::TakeReadEnd | ( | ) |
Take the read end of this pipe.
This can only be called once, as the object will be moved out.
Definition at line 14 of file tokenpipe.cpp.
TokenPipeEnd TokenPipe::TakeWriteEnd | ( | ) |
Take the write end of this pipe.
This should only be called once, as the object will be moved out.
Definition at line 20 of file tokenpipe.cpp.
|
private |
Definition at line 77 of file tokenpipe.h.