MCPcopy Create free account
hub / github.com/Clarionos/clarion / plugin_initialize

Method plugin_initialize

libraries/net/net_plugin.cpp:29–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27
28
29 void net_plugin::plugin_initialize( const variables_map& options ) {
30 std::cout << "initialize net plugin\n";
31 if( options.count("remote-endpoint") ) {
32 _remote_endpoints = options.at("remote-endpoint").as<std::vector<string>>();
33 }
34
35 auto ep = options.at("http-listen-endpoint").as<string>();
36 auto ip = ep.substr( 0, ep.find( ':' ));
37
38 _ip = asio::ip::make_address(ip);
39 _port = std::stoi(ep.substr( ip.size() + 1, ep.size()));
40 _docroot = options.at("document-root").as<string>();
41 }
42
43 void net_plugin::plugin_startup() {
44 std::cout << "starting net plugin \n";

Callers

nothing calls this directly

Calls 4

substrMethod · 0.80
countMethod · 0.45
findMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected