Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
subprocess::detail::Communication Class Reference

#include <subprocess.h>

Collaboration diagram for subprocess::detail::Communication:
[legend]

Public Member Functions

 Communication (Streams *stream)
 Communication (const Communication &)=delete
Communicationoperator= (const Communication &)=delete
 Communication (Communication &&)=default
Communicationoperator= (Communication &&)=default
int send (const char *msg, size_t length)
int send (const std::vector< char > &msg)
std::pair< OutBuffer, ErrBuffercommunicate (const char *msg, size_t length)
std::pair< OutBuffer, ErrBuffercommunicate (const std::vector< char > &msg)
void set_out_buf_cap (size_t cap)
void set_err_buf_cap (size_t cap)

Private Member Functions

std::pair< OutBuffer, ErrBuffercommunicate_threaded (const char *msg, size_t length)

Private Attributes

Streamsstream_
size_t out_buf_cap_ = DEFAULT_BUF_CAP_BYTES
size_t err_buf_cap_ = DEFAULT_BUF_CAP_BYTES

Detailed Description

A helper class to Streams. This takes care of management of communicating with the child process with the means of the correct file descriptor.

Definition at line 770 of file subprocess.h.

Constructor & Destructor Documentation

◆ Communication() [1/3]

subprocess::detail::Communication::Communication ( Streams * stream)
inline

Definition at line 773 of file subprocess.h.

Here is the caller graph for this function:

◆ Communication() [2/3]

subprocess::detail::Communication::Communication ( const Communication & )
delete
Here is the call graph for this function:

◆ Communication() [3/3]

subprocess::detail::Communication::Communication ( Communication && )
default
Here is the call graph for this function:

Member Function Documentation

◆ communicate() [1/2]

std::pair< OutBuffer, ErrBuffer > subprocess::detail::Communication::communicate ( const char * msg,
size_t length )
inline

Definition at line 1367 of file subprocess.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ communicate() [2/2]

std::pair< OutBuffer, ErrBuffer > subprocess::detail::Communication::communicate ( const std::vector< char > & msg)
inline

Definition at line 784 of file subprocess.h.

Here is the call graph for this function:

◆ communicate_threaded()

std::pair< OutBuffer, ErrBuffer > subprocess::detail::Communication::communicate_threaded ( const char * msg,
size_t length )
inlineprivate

Definition at line 1433 of file subprocess.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=() [1/2]

Communication & subprocess::detail::Communication::operator= ( Communication && )
default
Here is the call graph for this function:

◆ operator=() [2/2]

Communication & subprocess::detail::Communication::operator= ( const Communication & )
delete
Here is the call graph for this function:

◆ send() [1/2]

int subprocess::detail::Communication::send ( const char * msg,
size_t length )
inline

Definition at line 1355 of file subprocess.h.

Here is the caller graph for this function:

◆ send() [2/2]

int subprocess::detail::Communication::send ( const std::vector< char > & msg)
inline

Definition at line 1361 of file subprocess.h.

Here is the call graph for this function:

◆ set_err_buf_cap()

void subprocess::detail::Communication::set_err_buf_cap ( size_t cap)
inline

Definition at line 788 of file subprocess.h.

◆ set_out_buf_cap()

void subprocess::detail::Communication::set_out_buf_cap ( size_t cap)
inline

Definition at line 787 of file subprocess.h.

Member Data Documentation

◆ err_buf_cap_

size_t subprocess::detail::Communication::err_buf_cap_ = DEFAULT_BUF_CAP_BYTES
private

Definition at line 797 of file subprocess.h.

◆ out_buf_cap_

size_t subprocess::detail::Communication::out_buf_cap_ = DEFAULT_BUF_CAP_BYTES
private

Definition at line 796 of file subprocess.h.

◆ stream_

Streams* subprocess::detail::Communication::stream_
private

Definition at line 795 of file subprocess.h.


The documentation for this class was generated from the following file: