PortMapper/PortMapperTest.m
changeset 36 5165944a89b3
parent 26 cb9cdf247239
     1.1 --- a/PortMapper/PortMapperTest.m	Wed Apr 22 16:45:39 2009 -0700
     1.2 +++ b/PortMapper/PortMapperTest.m	Tue May 05 14:46:42 2009 -0700
     1.3 @@ -42,7 +42,7 @@
     1.4          _mapper.desiredPublicPort = 22222;
     1.5          
     1.6          // Now open the mapping (asynchronously):
     1.7 -        if( [_mapper open] ) {
     1.8 +        if( [_mapper start] ) {
     1.9              Log(@"Opening port mapping...");
    1.10              // Now listen for notifications to find out when the mapping opens, fails, or changes:
    1.11              [[NSNotificationCenter defaultCenter] addObserver: self 
    1.12 @@ -78,7 +78,7 @@
    1.13  
    1.14  - (void) dealloc
    1.15  {
    1.16 -    [_mapper close];
    1.17 +    [_mapper stop];
    1.18      [_mapper release];
    1.19      [super dealloc];
    1.20  }
    1.21 @@ -90,7 +90,9 @@
    1.22  
    1.23  TestCase(MYPortMapper) {
    1.24      
    1.25 +    EnableLogTo(DNS,YES);
    1.26      EnableLogTo(PortMapper,YES);
    1.27 +    
    1.28      // Here's how to simply obtain your local and public address(es):
    1.29      IPAddress *addr = [IPAddress localAddress];
    1.30      Log(@"** Local address is %@%@ ...getting public addr...",