MCPcopy Create free account
hub / github.com/ElementsProject/elements / Make

Method Make

src/util/tokenpipe.cpp:82–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82std::optional<TokenPipe> TokenPipe::Make()
83{
84 int fds[2] = {-1, -1};
85#if HAVE_O_CLOEXEC && HAVE_DECL_PIPE2
86 if (pipe2(fds, O_CLOEXEC) != 0) {
87 return std::nullopt;
88 }
89#else
90 if (pipe(fds) != 0) {
91 return std::nullopt;
92 }
93#endif
94 return TokenPipe(fds);
95}
96
97TokenPipe::~TokenPipe()
98{

Callers 15

PushNodeVersionMethod · 0.45
FetchBlockMethod · 0.45
NewPoWValidBlockMethod · 0.45
ProcessGetBlockDataMethod · 0.45
ProcessGetDataMethod · 0.45
SendBlockTransactionsMethod · 0.45
ProcessHeadersMessageMethod · 0.45
ProcessGetCFiltersMethod · 0.45
ProcessGetCFHeadersMethod · 0.45
ProcessGetCFCheckPtMethod · 0.45
ProcessMessageMethod · 0.45

Calls 1

TokenPipeClass · 0.85

Tested by 3

BOOST_AUTO_TEST_CASEFunction · 0.36
FUZZ_TARGET_INITFunction · 0.36
FillNodeFunction · 0.36