Bitcoin ABC 0.26.3
P2P Digital Currency
|
One end of a token pipe. More...
#include <tokenpipe.h>
Public Types | |
enum | Status { TS_ERR = -1 , TS_EOS = -2 } |
Return value constants for TokenWrite and TokenRead. More... | |
Public Member Functions | |
TokenPipeEnd (int fd=-1) | |
~TokenPipeEnd () | |
int | TokenWrite (uint8_t token) |
Write token to endpoint. | |
int | TokenRead () |
Read token from endpoint. | |
void | Close () |
Explicit close function. | |
bool | IsOpen () |
Return whether endpoint is open. | |
TokenPipeEnd (TokenPipeEnd &&other) | |
TokenPipeEnd & | operator= (TokenPipeEnd &&other) |
TokenPipeEnd (const TokenPipeEnd &)=delete | |
TokenPipeEnd & | operator= (const TokenPipeEnd &)=delete |
Private Attributes | |
int | m_fd = -1 |
One end of a token pipe.
Definition at line 14 of file tokenpipe.h.
Return value constants for TokenWrite and TokenRead.
Enumerator | |
---|---|
TS_ERR | I/O error. |
TS_EOS | Unexpected end of stream. |
Definition at line 23 of file tokenpipe.h.
TokenPipeEnd::TokenPipeEnd | ( | int | fd = -1 | ) |
Definition at line 26 of file tokenpipe.cpp.
TokenPipeEnd::~TokenPipeEnd | ( | ) |
|
inline |
Definition at line 57 of file tokenpipe.h.
|
delete |
void TokenPipeEnd::Close | ( | ) |
Explicit close function.
Definition at line 68 of file tokenpipe.cpp.
|
inline |
Return whether endpoint is open.
Definition at line 54 of file tokenpipe.h.
|
delete |
|
inline |
int TokenPipeEnd::TokenRead | ( | ) |
Read token from endpoint.
Definition at line 49 of file tokenpipe.cpp.
Write token to endpoint.
Definition at line 32 of file tokenpipe.cpp.
|
private |
Definition at line 16 of file tokenpipe.h.