PortMapper/PortMapperTest.m
changeset 48 2b4ad2067074
parent 26 cb9cdf247239
     1.1 --- a/PortMapper/PortMapperTest.m	Wed Apr 22 16:45:39 2009 -0700
     1.2 +++ b/PortMapper/PortMapperTest.m	Sat May 16 14:24:06 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...",