Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在异步线程中 TraceRoute 会导致serverip错误 #33

Open
sixTiger opened this issue Feb 26, 2019 · 1 comment
Open

在异步线程中 TraceRoute 会导致serverip错误 #33

sixTiger opened this issue Feb 26, 2019 · 1 comment

Comments

@sixTiger
Copy link

sixTiger commented Feb 26, 2019

@wangbin579 @hewei-chn @lazio579 @abchyk @philonpang

  • (void)startTraceRoute {
    _traceRoute = [SimaTraceRoute creatDafaultTraceRoute];
    _traceRoute.delegate = self;
    dispatch_async(dispatch_get_global_queue(0, 0), ^{
    [self->_traceRoute doTraceRoute:@"cache.sina.cn"];
    });
    }

/**
输出日志

@param routeLog 日志
*/

  • (void)appendRouteLog:(NSString *)routeLog {
    NSLog(@"XXB: %@",routeLog);
    }

/**
追踪结束
*/

  • (void)traceRouteDidEnd {
    NSLog(@"XXB: %@",@"traceRouteDidEnd");
    dispatch_async(dispatch_get_global_queue(0, 0), ^{
    [self startTraceRoute];
    });
    }

                  if (try == 0) {
                      [traceTTLLog appendFormat:@"%@\t\t", hostAddress];
                  }
                  [traceTTLLog appendFormat:@"%0.2fms\t", (float)delta / 1000];
                  NSLog(@"XXB hostAddress:ttl %@ try %@ %@",@(ttl),@(try),hostAddress);
    

hostAddress:ttl 1 try 0 10.223.107.254
hostAddress:ttl 1 try 1 10.223.107.254
hostAddress:ttl 1 try 2 10.223.107.254
hostAddress:ttl 2 try 0 10.211.254.5
hostAddress:ttl 2 try 1 10.211.254.5
hostAddress:ttl 2 try 2 10.211.254.5
hostAddress:ttl 3 try 0 10.235.254.101
hostAddress:ttl 3 try 1 10.235.254.101
hostAddress:ttl 3 try 2 10.235.254.101
hostAddress:ttl 4 try 0 10.223.107.254
hostAddress:ttl 4 try 1 123.125.7.216
hostAddress:ttl 4 try 2 123.125.7.216
hostAddress:ttl 5 try 0 10.223.107.254
hostAddress:ttl 5 try 1 10.223.107.254
hostAddress:ttl 5 try 2 123.125.7.216
hostAddress:ttl 6 try 0 123.125.7.216
hostAddress:ttl 6 try 1 10.235.254.101
hostAddress:ttl 6 try 2 123.125.7.216
hostAddress:ttl 7 try 0 123.125.7.216
hostAddress:ttl 7 try 1 10.211.254.5
hostAddress:ttl 7 try 2 10.211.254.5
hostAddress:ttl 8 try 0 10.211.254.5
hostAddress:ttl 8 try 1 123.125.7.216
hostAddress:ttl 8 try 2 123.125.7.216
hostAddress:ttl 9 try 0 123.125.7.216
hostAddress:ttl 9 try 1 123.125.7.216
hostAddress:ttl 9 try 2 123.125.7.216
hostAddress:ttl 10 try 0 123.125.7.216
hostAddress:ttl 10 try 1 123.125.7.216

@wangbin579
Copy link

不好意思,我没有参与到这个项目中来

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants