MCPcopy Create free account
hub / github.com/acl-dev/acl / create_service

Function create_service

app/wizard/http_creator.cpp:105–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105static bool create_service(file_tmpl& tmpl, const char* type)
106{
107 char buf[256];
108 if (type == NULL || *type == 0) {
109 printf("choose master_service type:\r\n");
110 printf(" t: for master_threads\r\n"
111 " f: for master_fiber\r\n"
112 " p: for master_proc\r\n");
113 printf(">");
114 fflush(stdout);
115
116 int n = acl_vstream_gets_nonl(ACL_VSTREAM_IN, buf, sizeof(buf));
117 if (n == ACL_VSTREAM_EOF) {
118 return false;
119 }
120
121 type = buf;
122 }
123
124 if (strcasecmp(type, "t") == 0) {
125 create_threads(tmpl);
126 } else if (strcasecmp(type, "p") == 0) {
127 create_proc(tmpl);
128 } else if (strcasecmp(type, "f") == 0) {
129 create_fiber(tmpl);
130 } else {
131 printf("invalid type: %s\r\n", type);
132 return false;
133 }
134
135 return true;
136}
137
138static bool create_http_servlet(file_tmpl& tmpl, const char* type)
139{

Callers 1

create_http_servletFunction · 0.85

Calls 4

acl_vstream_gets_nonlFunction · 0.85
create_threadsFunction · 0.85
create_procFunction · 0.85
create_fiberFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…