Asio Extensions
Additional functionality built on top of (Boost.)Asio
Standard stream handles

Functions

file_handle asioext::get_stdin ()
 Get a handle to the standard input. More...
 
file_handle asioext::get_stdin (error_code &ec) noexcept
 Get a handle to the standard input. More...
 
file_handle asioext::get_stdout ()
 Get a handle to the standard output. More...
 
file_handle asioext::get_stdout (error_code &ec) noexcept
 Get a handle to the standard output. More...
 
file_handle asioext::get_stderr ()
 Get a handle to the standard error. More...
 
file_handle asioext::get_stderr (error_code &ec) noexcept
 Get a handle to the standard error. More...
 

Detailed Description

Functions returning handles to stderr, stdout, stdin.

Function Documentation

◆ get_stderr() [1/2]

file_handle asioext::get_stderr ( )

Get a handle to the standard error.

This function returns a handle to the standard error.

Returns
A handle to the standard error (or an empty handle in case of failure). Ownership is not transferred to the caller. Closing the handle returned by this function leads to undefined behavior.
Exceptions
asio::system_errorThrown on failure.

◆ get_stderr() [2/2]

file_handle asioext::get_stderr ( error_code ec)
noexcept

Get a handle to the standard error.

This function returns a handle to the standard error.

Parameters
ecSet to indicate what error occurred. If no error occurred, the object is reset.
Returns
A handle to the standard error (or an empty handle in case of failure). Ownership is not transferred to the caller. Closing the handle returned by this function leads to undefined behavior.

◆ get_stdin() [1/2]

file_handle asioext::get_stdin ( )

Get a handle to the standard input.

This function returns a handle to the standard input.

Returns
A handle to the standard input (or an empty handle in case of failure). Ownership is not transferred to the caller. Closing the handle returned by this function leads to undefined behavior.
Exceptions
asio::system_errorThrown on failure.

◆ get_stdin() [2/2]

file_handle asioext::get_stdin ( error_code ec)
noexcept

Get a handle to the standard input.

This function returns a handle to the standard input.

Parameters
ecSet to indicate what error occurred. If no error occurred, the object is reset.
Returns
A handle to the standard input (or an empty handle in case of failure). Ownership is not transferred to the caller. Closing the handle returned by this function leads to undefined behavior.

◆ get_stdout() [1/2]

file_handle asioext::get_stdout ( )

Get a handle to the standard output.

This function returns a handle to the standard output.

Returns
A handle to the standard output (or an empty handle in case of failure). Ownership is not transferred to the caller. Closing the handle returned by this function leads to undefined behavior.
Exceptions
asio::system_errorThrown on failure.

◆ get_stdout() [2/2]

file_handle asioext::get_stdout ( error_code ec)
noexcept

Get a handle to the standard output.

This function returns a handle to the standard output.

Parameters
ecSet to indicate what error occurred. If no error occurred, the object is reset.
Returns
A handle to the standard output (or an empty handle in case of failure). Ownership is not transferred to the caller. Closing the handle returned by this function leads to undefined behavior.