Bitcoin Core 29.99.0
P2P Digital Currency
Public Member Functions | Private Member Functions | Private Attributes | List of all members
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 772 of file subprocess.h.

Constructor & Destructor Documentation

◆ Communication() [1/3]

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

Definition at line 775 of file subprocess.h.

◆ Communication() [2/3]

subprocess::detail::Communication::Communication ( const Communication )
delete

◆ Communication() [3/3]

subprocess::detail::Communication::Communication ( Communication &&  )
default

Member Function Documentation

◆ communicate() [1/2]

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

Definition at line 1379 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 786 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 1445 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

◆ operator=() [2/2]

Communication & subprocess::detail::Communication::operator= ( const Communication )
delete

◆ send() [1/2]

int subprocess::detail::Communication::send ( 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:

◆ send() [2/2]

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

Definition at line 1373 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 790 of file subprocess.h.

Here is the caller graph for this function:

◆ set_out_buf_cap()

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

Definition at line 789 of file subprocess.h.

Here is the caller graph for this function:

Member Data Documentation

◆ err_buf_cap_

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

Definition at line 799 of file subprocess.h.

◆ out_buf_cap_

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

Definition at line 798 of file subprocess.h.

◆ stream_

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

Definition at line 797 of file subprocess.h.


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