|
楼主 |
发表于 2009-10-29 12:33:25
|
显示全部楼层
原帖由 wishel 于 2009-10-27 16:21 发表
static int
parse_args (int argc, ACE_TCHAR *argv[])
{
ACE_Get_Opt get_opt (argc, argv, ACE_TEXT("h:p:f:d:"));
int c;
while ((c = get_opt ()) != EOF)
switch (c)
{
case 'h':
host = get_opt.opt_arg ();
break;
case 'p':
port = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'f':
file = get_opt.opt_arg ();
break;
case 'd':
dump_file = get_opt.opt_arg ();
break;
default:
ACE_ERROR ((LM_ERROR, "%p.\n",
"usage :\n"
"-h <host>\n"
"-p <port>\n"
"-f <file>\n"));
return -1;
}
return 0;
}
服务器和客户端运行的时候参数怎么设置? |
|