![]() |
Bitcoin Core 32.99.0
P2P Digital Currency
|
Unidirectional bytes queue (FIFO). More...
#include <net.h>
Public Member Functions | |
| ssize_t | GetBytes (void *buf, size_t len, int flags=0) EXCLUSIVE_LOCKS_REQUIRED(!m_mutex) |
| Get bytes and remove them from the pipe. | |
| void | PushBytes (const void *buf, size_t len) EXCLUSIVE_LOCKS_REQUIRED(!m_mutex) |
| Push bytes to the pipe. | |
| void | Eof () EXCLUSIVE_LOCKS_REQUIRED(!m_mutex) |
Signal end-of-file on the receiving end (GetBytes()). | |
Private Member Functions | |
| std::vector< uint8_t > m_data | GUARDED_BY (m_mutex) |
| bool m_eof | GUARDED_BY (m_mutex) |
Private Attributes | |
| Mutex | m_mutex |
| void DynSock::Pipe::Eof | ( | ) |
Signal end-of-file on the receiving end (GetBytes()).
Definition at line 293 of file net.cpp.
Get bytes and remove them from the pipe.
| [in] | buf | Destination to write bytes to. |
| [in] | len | Write up to this number of bytes. |
| [in] | flags | Same as the flags of recv(2). Just MSG_PEEK is honored. |
buf. 0 if Eof() has been called. If no bytes are available then -1 is returned and errno is set to EAGAIN. Definition at line 264 of file net.cpp.