Refresh works, but...
Refresh works, but...
- Subject: Refresh works, but...
- From: Joe Maffia <email@hidden>
- Date: Thu, 10 Feb 2005 23:02:45 +0100
In this way the app seem to work, but it takes also of 70% of CPU...
- (id)sender
{
socketToRemoteServer = socket(AF_INET, SOCK_STREAM, 0);
if(socketToRemoteServer > 0) {
NSFileHandle * remoteConnection = [[NSFileHandle alloc] initWithFileDescriptor:socketToRemoteServer closeOnDealloc:YES];
if(remoteConnection) {
NSLog( @"notifica" );
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(readAllTheData:) name:NSFileHandleReadToEndOfFileCompletionNotification object:remoteConnection];
if(connect(socketToRemoteServer, (struct sockaddr *)socketAddress, sizeof(*socketAddress)) == 0) {
[remoteConnection readToEndOfFileInBackgroundAndNotify];
}
} else {
close(socketToRemoteServer);
}
}
}
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden