Hi there! I'm using (or trying to...) AsyncSocket to connect to a server but it always connect even if the server is not running... I'm using the SDK 3.1.2. Anyone faced this problem before?
#import "mluPresenterAppDelegate.h"
#import "AsyncSocket.h"
@implementation mluPresenterAppDelegate
@synthesize window;
#pragma mark -
#pragma mark Application lifecycle
- (void)applicationDidFinishLaunching:(UIApplication *)application {
AsyncSocket *assClient = [[AsyncSocket alloc] initWithDelegate:self];
NSError *err = nil;
if (![assClient connectToHost:@"127.0.0.1" onPort:7777 error:&err]) {
NSLog(@"%@ %@", [err code], [err localizedDescription]);
} else {
NSLog(@"Conectou!");
}
[window makeKeyAndVisible];
}
The result is always 2010-02-22 22:54:26.922 mluPresenter[2083:207] Conectou! even if I change the port to 1 or to a port out of the range...
Thanks in advance.