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

Function main

lib_protocol/samples/httpd/main.c:266–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

264}
265
266int main(int argc, char *argv[])
267{
268 char addr[256] = "0.0.0.0:8080", filename[256];
269 int ch, client_mode = 0;
270
271#if 1
272 acl_mem_slice_init(8, 10240, 100000, ACL_SLICE_FLAG_GC2 | ACL_SLICE_FLAG_RTGC_OFF | ACL_SLICE_FLAG_LP64_ALIGN);
273 http_hdr_cache(100);
274#endif
275
276 while ((ch = getopt(argc, argv, "hs:c:")) > 0) {
277 switch (ch) {
278 case 'h':
279 usage(argv[0]);
280 exit (0);
281 case 's':
282 ACL_SAFE_STRNCPY(addr, optarg, sizeof(addr));
283 break;
284 case 'c':
285 client_mode = 1;
286 ACL_SAFE_STRNCPY(filename, optarg, sizeof(filename));
287 break;
288 default:
289 break;
290 }
291 }
292
293 if (0)
294 test();
295
296 init();
297 if (client_mode)
298 run_client(addr, filename);
299 else
300 run_server(addr);
301 end();
302 return (0);
303}

Callers

nothing calls this directly

Calls 9

acl_mem_slice_initFunction · 0.85
http_hdr_cacheFunction · 0.85
usageFunction · 0.70
testFunction · 0.70
initFunction · 0.70
run_clientFunction · 0.70
run_serverFunction · 0.70
endFunction · 0.70
getoptFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…