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

Method serve

src/ipc/capnp/protocol.cpp:54–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52 return mp::ConnectStream<messages::Init>(*m_loop, fd);
53 }
54 void serve(int fd, const char* exe_name, interfaces::Init& init) override
55 {
56 assert(!m_loop);
57 mp::g_thread_context.thread_name = mp::ThreadName(exe_name);
58 m_loop.emplace(exe_name, &IpcLogFn, &m_context);
59 mp::ServeStream<messages::Init>(*m_loop, fd, init);
60 m_loop->loop();
61 m_loop.reset();
62 }
63 void addCleanup(std::type_index type, void* iface, std::function<void()> cleanup) override
64 {
65 mp::ProxyTypeRegister::types().at(type)(iface).cleanup.emplace_back(std::move(cleanup));

Callers 1

startSpawnedProcessMethod · 0.80

Calls 1

resetMethod · 0.45

Tested by

no test coverage detected