| 32 | int num_sleeps = 0; |
| 33 | |
| 34 | void |
| 35 | parse_args(int& argc, ACE_TCHAR** argv) |
| 36 | { |
| 37 | ACE_Arg_Shifter shifter(argc, argv); |
| 38 | while (shifter.is_anything_left()) |
| 39 | { |
| 40 | const ACE_TCHAR* arg; |
| 41 | if ((arg = shifter.get_the_parameter(ACE_TEXT("-num_sleeps")))) |
| 42 | { |
| 43 | num_sleeps = ACE_OS::atoi(arg); |
| 44 | shifter.consume_arg(); |
| 45 | } |
| 46 | else if ((arg = shifter.get_the_parameter(ACE_TEXT("-sleep_secs")))) |
| 47 | { |
| 48 | sleep_time = ACE_OS::atoi(arg); |
| 49 | shifter.consume_arg(); |
| 50 | } |
| 51 | else if (shifter.cur_arg_strncasecmp(ACE_TEXT("-take-next")) == 0) |
| 52 | { |
| 53 | take_next = true; |
| 54 | shifter.consume_arg(); |
| 55 | } |
| 56 | else if (shifter.cur_arg_strncasecmp(ACE_TEXT("-take")) == 0) |
| 57 | { |
| 58 | take_next = false; |
| 59 | take = true; |
| 60 | shifter.consume_arg(); |
| 61 | } |
| 62 | else if (shifter.cur_arg_strncasecmp(ACE_TEXT("-zero-copy")) == 0) |
| 63 | { |
| 64 | take_next = false; |
| 65 | zero_copy = true; |
| 66 | shifter.consume_arg(); |
| 67 | } |
| 68 | else |
| 69 | { |
| 70 | shifter.ignore_arg(); |
| 71 | } |
| 72 | } |
| 73 | } |
| 74 | } // namespace |
| 75 | |
| 76 | int |