#include <pistream.hpp>
Public Member Functions | |
pistream (detail::file_handle &fh) | |
detail::file_handle & | handle () |
void | close () |
The pistream class represents an output communication channel with the child process. The child process writes data to this stream and the parent process can read it through the pistream object. In other words, from the child's point of view, the communication channel is an output one, but from the parent's point of view it is an input one; hence the confusing pistream name.
pistream objects cannot be copied because they own the file handle they use to communicate with the child and because they buffer data that flows through the communication channel.
A pistream object behaves as a std::istream stream in all senses. The class is only provided because it must provide a method to let the caller explicitly close the communication channel.
boost::process::pistream::pistream | ( | detail::file_handle & | fh | ) | [inline, explicit] |
detail::file_handle& boost::process::pistream::handle | ( | ) | [inline] |
Returns the file handle managed by this stream.
The file handle must not be copied. Copying invalidates the source file handle making the pistream unusable.
void boost::process::pistream::close | ( | ) | [inline] |