Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio::chain::eosvmoc::wrapped_fd Class Reference

#include <ipc_helpers.hpp>

Public Member Functions

 wrapped_fd ()
 
 wrapped_fd (int fd)
 
 wrapped_fd (const wrapped_fd &)=delete
 
wrapped_fdoperator= (const wrapped_fd &)=delete
 
 wrapped_fd (wrapped_fd &&other)
 
wrapped_fdoperator= (wrapped_fd &&other)
 
 operator int () const
 
int release ()
 
 ~wrapped_fd ()
 

Detailed Description

Definition at line 14 of file ipc_helpers.hpp.

Constructor & Destructor Documentation

◆ wrapped_fd() [1/4]

sysio::chain::eosvmoc::wrapped_fd::wrapped_fd ( )
inline

Definition at line 16 of file ipc_helpers.hpp.

16: _inuse(false) {}

◆ wrapped_fd() [2/4]

sysio::chain::eosvmoc::wrapped_fd::wrapped_fd ( int fd)
inline

Definition at line 17 of file ipc_helpers.hpp.

17: _inuse(true), _fd(fd) {}

◆ wrapped_fd() [3/4]

sysio::chain::eosvmoc::wrapped_fd::wrapped_fd ( const wrapped_fd & )
delete

◆ wrapped_fd() [4/4]

sysio::chain::eosvmoc::wrapped_fd::wrapped_fd ( wrapped_fd && other)
inline

Definition at line 20 of file ipc_helpers.hpp.

20: _inuse(other._inuse), _fd(other._fd) {other._inuse = false;}

◆ ~wrapped_fd()

sysio::chain::eosvmoc::wrapped_fd::~wrapped_fd ( )
inline

Definition at line 40 of file ipc_helpers.hpp.

40 {
41 if(_inuse)
42 close(_fd);
43 }
void close(T *e, websocketpp::connection_hdl hdl)
Here is the call graph for this function:

Member Function Documentation

◆ operator int()

sysio::chain::eosvmoc::wrapped_fd::operator int ( ) const
inline

Definition at line 30 of file ipc_helpers.hpp.

30 {
31 FC_ASSERT(_inuse, "trying to get the value of a not-in-use wrappedfd");
32 return _fd;
33 }
#define FC_ASSERT(TEST,...)
Checks a condition and throws an assert_exception if the test is FALSE.

◆ operator=() [1/2]

wrapped_fd & sysio::chain::eosvmoc::wrapped_fd::operator= ( const wrapped_fd & )
delete

◆ operator=() [2/2]

wrapped_fd & sysio::chain::eosvmoc::wrapped_fd::operator= ( wrapped_fd && other)
inline

Definition at line 21 of file ipc_helpers.hpp.

21 {
22 if(_inuse)
23 close(_fd);
24 _inuse = other._inuse;
25 _fd = other._fd;
26 other._inuse = false;
27 return *this;
28 }
Here is the call graph for this function:

◆ release()

int sysio::chain::eosvmoc::wrapped_fd::release ( )
inline

Definition at line 35 of file ipc_helpers.hpp.

35 {
36 _inuse = false;
37 return _fd;
38 }
Here is the caller graph for this function:

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