One end of a token pipe.
More...
#include <tokenpipe.h>
One end of a token pipe.
Definition at line 14 of file tokenpipe.h.
◆ Status
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() [1/3]
TokenPipeEnd::TokenPipeEnd |
( |
int |
fd = -1 | ) |
|
◆ ~TokenPipeEnd()
TokenPipeEnd::~TokenPipeEnd |
( |
| ) |
|
◆ TokenPipeEnd() [2/3]
◆ TokenPipeEnd() [3/3]
◆ Close()
void TokenPipeEnd::Close |
( |
| ) |
|
◆ IsOpen()
bool TokenPipeEnd::IsOpen |
( |
| ) |
|
|
inline |
Return whether endpoint is open.
Definition at line 54 of file tokenpipe.h.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ TokenRead()
int TokenPipeEnd::TokenRead |
( |
| ) |
|
Read token from endpoint.
- Returns
- >=0 Token value, if successful. <0 if error: TS_ERR If an error happened. TS_EOS If end of stream happened.
Definition at line 49 of file tokenpipe.cpp.
◆ TokenWrite()
int TokenPipeEnd::TokenWrite |
( |
uint8_t |
token | ) |
|
Write token to endpoint.
- Returns
- 0 If successful. <0 if error: TS_ERR If an error happened. TS_EOS If end of stream happened.
Definition at line 32 of file tokenpipe.cpp.
◆ m_fd
int TokenPipeEnd::m_fd = -1 |
|
private |
The documentation for this class was generated from the following files: