OpenBMC:BmcWeb app获取socket
OpenBMC:BmcWeb app.run-CSDN博客
app对象在run函数中调用了setupSocket()
static std::vector<Acceptor> setupSocket()
{std::vector<Acceptor> acceptors;char** names = nullptr;int listenFdCount = sd_listen_fds_with_names(0, &names);BMCWEB_LOG_DEBUG("Got {} sockets to open", listenFdCount);if (listenFdCount < 0){BMCWEB_LOG_CRITICAL("Failed to read socket files");return acceptors;}int socketIndex = 0;for (char* name :std::span<char*>(names, static_cast<size_t>(listenFdCount)))