• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Refresh works, but...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: Xcode CopyFolder Phase
  • Next by Date: Re: keyDown and Enter/Tab keys
  • Previous by thread: Re: Mouse over menu item event?
  • Next by thread: NSDocumentController redisplay NSPanel
  • Index(es):
    • Date
    • Thread