![]() |
Bitcoin Core 31.1.0
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.
| enum TokenPipeEnd::Status |
Return value constants for TokenWrite and TokenRead.
| Enumerator | |
|---|---|
| TS_ERR | I/O error. |
| TS_EOS | Unexpected end of stream. |
Definition at line 24 of file tokenpipe.h.
| TokenPipeEnd::TokenPipeEnd | ( | int | fd = -1 | ) |
| TokenPipeEnd::~TokenPipeEnd | ( | ) |
|
inline |
|
delete |
| void TokenPipeEnd::Close | ( | ) |
Explicit close function.
Definition at line 76 of file tokenpipe.cpp.
|
inline |
Return whether endpoint is open.
Definition at line 53 of file tokenpipe.h.
|
delete |
|
inline |
| int TokenPipeEnd::TokenRead | ( | ) |
Read token from endpoint.
Definition at line 56 of file tokenpipe.cpp.
| int TokenPipeEnd::TokenWrite | ( | uint8_t | token | ) |
Write token to endpoint.
Definition at line 38 of file tokenpipe.cpp.
|
private |
Definition at line 17 of file tokenpipe.h.