OpenBMC:BmcWeb app获取socket

OpenBMC:BmcWeb app.run-CSDN博客

app对象在run函数中调用了setupSocket()

static std::vector setupSocket()
{
    std::vector 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(names, static_cast(listenFdCount)))

你可能感兴趣的:(OpenBMC,linux)