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

Function main

lib_acl_cpp/samples/connect_manager/main.cpp:172–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172int main(int argc, char* argv[])
173{
174 int ch, max = 10, min = 0, ttl = 60;
175 int check_type = 0, delay = 2;
176 acl::string addrs("www.sina.com.cn:80;www.263.net:80;www.qq.com:81");
177 acl::string proto("pop3");
178
179 // ��ʼ�� acl ��
180 acl::acl_cpp_init();
181
182 // ��־�������׼���
183 acl::log::stdout_open(true);
184
185 while ((ch = getopt(argc, argv, "hs:n:c:m:t:o:p:d:C")) > 0) {
186 switch (ch) {
187 case 'h':
188 usage(argv[0]);
189 return 0;
190 case 's':
191 addrs = optarg;
192 break;
193 case 'c':
194 max = atoi(optarg);
195 break;
196 case 'o':
197 ttl = atoi(optarg);
198 break;
199 case 'm':
200 min = atoi(optarg);
201 break;
202 case 'n':
203 __loop_count = atoi(optarg);
204 break;
205 case 't':
206 check_type = atoi(optarg);
207 break;
208 case 'p':
209 proto = optarg;
210 break;
211 case 'd':
212 delay = atoi(optarg);
213 break;
214 case 'C':
215 __threads = new acl::thread_pool;
216 __threads->set_limit(20);
217 __threads->set_idle(120);
218 __threads->start();
219 break;
220 default:
221 usage(argv[0]);
222 return 0;
223 }
224 }
225
226 init(addrs, max, min, ttl, check_type, proto);
227 run(max, delay);
228 end();
229

Callers

nothing calls this directly

Calls 7

acl_cpp_initFunction · 0.85
usageFunction · 0.70
initFunction · 0.70
runFunction · 0.70
endFunction · 0.70
getoptFunction · 0.50
startMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…