URING++
Loading...
Searching...
No Matches
Public Member Functions | List of all members
uringpp::pipe Class Reference

A pipe. More...

#include <uringpp/pipe.h>

Public Member Functions

 pipe (std::shared_ptr< event_loop > loop)
 Construct a new pipe object. More...
 
 pipe (pipe &&other) noexcept
 Move construct a new pipe object. More...
 
int readable_fd () const
 Get the read end of the pipe. More...
 
int writable_fd () const
 Get the write end of the pipe. More...
 
task< void > close_read ()
 Close the read end of the pipe. More...
 
task< void > close_write ()
 Close the write end of the pipe. More...
 
task< void > close ()
 Close the read and write ends of the pipe. More...
 
 ~pipe ()
 Destroy the pipe object. If any end of the pipe is still open, it will be closed. More...
 

Detailed Description

A pipe.

Constructor & Destructor Documentation

◆ pipe() [1/2]

uringpp::pipe::pipe ( std::shared_ptr< event_loop loop)
inline

Construct a new pipe object.

Parameters
loopThe event loop.

◆ pipe() [2/2]

uringpp::pipe::pipe ( pipe &&  other)
inlinenoexcept

Move construct a new pipe object.

Parameters
other

◆ ~pipe()

uringpp::pipe::~pipe ( )
inline

Destroy the pipe object. If any end of the pipe is still open, it will be closed.

Member Function Documentation

◆ close()

task< void > uringpp::pipe::close ( )
inline

Close the read and write ends of the pipe.

Returns
task<void>

◆ close_read()

task< void > uringpp::pipe::close_read ( )
inline

Close the read end of the pipe.

Returns
task<void>

◆ close_write()

task< void > uringpp::pipe::close_write ( )
inline

Close the write end of the pipe.

Returns
task<void>

◆ readable_fd()

int uringpp::pipe::readable_fd ( ) const
inline

Get the read end of the pipe.

Returns
int The read end of the pipe.

◆ writable_fd()

int uringpp::pipe::writable_fd ( ) const
inline

Get the write end of the pipe.

Returns
int The write end of the pipe.

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