MCPcopy Create free account
hub / github.com/OpenImageDebugger/OpenImageDebugger / parse_endpoint

Function parse_endpoint

src/platform/app_services.cpp:40–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38namespace oid::platform {
39
40Endpoint parse_endpoint(int argc, char** argv) {
41 Endpoint ep;
42 int i = 1;
43 while (i + 1 < argc) {
44 const std::string arg = argv[i];
45 if (arg == "-h" || arg == "--hostname") {
46 ep.host = argv[i + 1];
47 i += 2;
48 } else if (arg == "-p" || arg == "--port") {
49 ep.port = static_cast<unsigned short>(std::stoi(argv[i + 1]));
50 i += 2;
51 } else {
52 ++i;
53 }
54 }
55 return ep;
56}
57
58// No-op on native: there is no inbound host message hook to wire here --
59// that only exists for the non-native (postMessage) embedding, which must

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected