MCPcopy Create free account
hub / github.com/apache/trafficserver / RPCServer

Method RPCServer

src/mgmt/rpc/server/RPCServer.cc:29–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27static DbgCtl dbg_ctl{"rpc"};
28
29RPCServer::RPCServer(config::RPCConfig const &conf)
30{
31 switch (conf.get_comm_type()) {
32 case config::RPCConfig::CommType::UNIX: {
33 _socketImpl = std::make_unique<comm::IPCSocketServer>();
34 if (!_socketImpl->configure(conf.get_comm_config_params())) {
35 Dbg(dbg_ctl, "Unable to configure the socket: Stick to the default configuration.");
36 }
37 } break;
38 default:;
39 throw std::runtime_error("Unsupported communication type.");
40 };
41
42 // make sure we can initialize it.
43 if (auto ec = _socketImpl->init(); ec) {
44 throw std::runtime_error(ec.message());
45 }
46}
47
48std::string_view
49RPCServer::selected_comm_name() const noexcept

Callers

nothing calls this directly

Calls 5

get_comm_typeMethod · 0.80
configureMethod · 0.45
initMethod · 0.45
messageMethod · 0.45

Tested by

no test coverage detected