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

Function main

lib_acl_cpp/samples/http_server/http_server.cpp:151–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151int main(int argc, char* argv[])
152{
153#ifdef WIN32
154 acl_cpp_init();
155#endif
156
157 bool preread = false;
158 char addr[32], rpc_addr[32], ch;
159 bool use_mempool = false;
160 bool use_kernel = false;
161 bool enable_stdout = false;
162 int nthreads = 20;
163
164 acl::safe_snprintf(addr, sizeof(addr), "127.0.0.1:9001");
165 acl::safe_snprintf(rpc_addr, sizeof(rpc_addr), "127.0.0.1:0");
166
167 while ((ch = getopt(argc, argv, "vkhpms:n:N:r:")) > 0)
168 {
169 switch (ch)
170 {
171 case 'h':
172 usage(argv[0]);
173 return 0;
174 case 's':
175 acl::safe_snprintf(addr, sizeof(addr), "%s", optarg);
176 break;
177 case 'p':
178 preread = true;
179 break;
180 case 'm':
181 use_mempool = true;
182 break;
183 case 'k':
184 use_kernel = true;
185 break;
186 case 'n':
187 var_data_size = atoi(optarg);
188 if (var_data_size <= 0)
189 var_data_size = 1024;
190 break;
191 case 'N':
192 nthreads = atoi(optarg);
193 if (nthreads <= 0)
194 nthreads = 10;
195 break;
196 case 'v':
197 enable_stdout = true;
198 break;
199 case 'r':
200 acl::safe_snprintf(rpc_addr, sizeof(rpc_addr), "%s", optarg);
201 break;
202 default:
203 break;
204 }
205 }
206
207 // �Ƿ�����ֲ߳̾��ڴ��
208 if (use_mempool)

Callers

nothing calls this directly

Calls 15

acl_cpp_initFunction · 0.85
safe_snprintfFunction · 0.85
acl_mem_slice_initFunction · 0.85
rpc_stats_finishFunction · 0.85
acl_mem_slice_gcFunction · 0.85
acl_mem_slice_destroyFunction · 0.85
add_accept_callbackMethod · 0.80
usageFunction · 0.70
rpc_stats_initFunction · 0.70
rpc_outFunction · 0.70
rpc_req_outFunction · 0.70
rpc_read_wait_outFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…