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

Function main

lib_acl_cpp/samples/ssl/aio_server/main.cpp:243–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243int main(int argc, char* argv[])
244{
245 // �¼������Ƿ�����ں��еĸ�Чģʽ
246 bool use_kernel = false, use_polarssl = true;
247 acl::string key_file, cert_file, libpath;
248 acl::string addr("0.0.0.0:9800");
249 int ch, delay_ms = 100, check_fds_inter = 10;
250
251 while ((ch = getopt(argc, argv, "l:d:hkL:t:K:C:n:M:I:")) > 0) {
252 switch (ch) {
253 case 'h':
254 usage(argv[0]);
255 return 0;
256 case 'd':
257 libpath = optarg;
258 break;
259 case 'l':
260 addr = optarg;
261 break;
262 case 'k':
263 use_kernel = true;
264 break;
265 case 'L':
266 __max = atoi(optarg);
267 break;
268 case 't':
269 __timeout = atoi(optarg);
270 break;
271 case 'K':
272 key_file = optarg;
273 break;
274 case 'C':
275 cert_file = optarg;
276 break;
277 case 'n':
278 __max_used = atoi(optarg);
279 break;
280 case 'M':
281 delay_ms = atoi(optarg);
282 break;
283 case 'I':
284 check_fds_inter = atoi(optarg);
285 break;
286 default:
287 break;
288 }
289 }
290
291 acl::log::stdout_open(true);
292
293 if (libpath.find("mbedtls") != NULL) {
294 const std::vector<acl::string>& libs = libpath.split2(";, \t");
295 if (libs.size() != 3) {
296 printf("invalid libpath=%s\r\n", libpath.c_str());
297 return 1;
298 }
299 acl::mbedtls_conf::set_libpath(libs[0], libs[1], libs[2]);
300

Callers

nothing calls this directly

Calls 15

acl_cpp_initFunction · 0.85
set_delay_secMethod · 0.80
set_delay_usecMethod · 0.80
add_accept_callbackMethod · 0.80
usageFunction · 0.70
getoptFunction · 0.50
findMethod · 0.45
sizeMethod · 0.45
c_strMethod · 0.45
clearMethod · 0.45
emptyMethod · 0.45
enable_cacheMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…