Skip to content

Commit

Permalink
Adding iPhone support (since iPhone doesn't currently support IPv6)
Browse files Browse the repository at this point in the history
  • Loading branch information
robbiehanson committed Jul 27, 2008
1 parent b1312ee commit 331732d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions AsyncSocket.m
Expand Up @@ -14,6 +14,10 @@
#import <arpa/inet.h>
#import <netdb.h>

#if TARGET_OS_IPHONE
#import <CFNetwork/CFNetwork.h>
#endif

#pragma mark Declarations

#define READQUEUE_CAPACITY 5 // Initial capacity
Expand Down Expand Up @@ -490,7 +494,12 @@ - (BOOL)acceptOnAddress:(NSString *)hostaddr port:(UInt16)port error:(NSError **
if (address6)
{
theSocket6 = [self createAcceptSocketForAddress:address6 error:errPtr];

// Note: The iPhone doesn't currently support IPv6

#if !TARGET_OS_IPHONE
if (theSocket6 == NULL) goto Failed;
#endif
}

// Attach the sockets to the run loop so that callback methods work
Expand Down

0 comments on commit 331732d

Please sign in to comment.