• 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
More NetSocket problems...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

More NetSocket problems...


  • Subject: More NetSocket problems...
  • From: AndrĂ© Lind <email@hidden>
  • Date: Mon, 31 Jan 2005 23:47:03 +0100

Ok, got my NSFileHandles to work, over to my next problem :(

My program is sending and the other one is recieving and everything is a-ok :D
BUT... if I just nudge my mouse or do anything on my sending computer the socket disconnects...
The filetransfer takes all of my CPU it can... not good :/

This is how I did but i dont know if its the best way (probobly not):

- (void)netsocketDataSent:(NetSocket*)inNetSocket
{
NSLog(@"Data sent");
[self sendFile];
}

-(void)sendFile
{
NSData *readData;
readData = [outgoingHandle readDataOfLength:1024*16];


[transferSocket writeData:readData];
}

-(id)init
{
outgoingHandle = [[NSFileHandle fileHandleForReadingAtPath:@"Filename"] retain];
}

Anyone know what to do about this? The netsocket uses currentRunloop, maybe its that?
I really dont know what to do about this problem :(

André
 _______________________________________________
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: Undocumented Foundation selector not recognized?
  • Next by Date: Re: CFPasteboardResolveAllPromisedData crash
  • Previous by thread: Page Break
  • Next by thread: + initialize docs conflict?
  • Index(es):
    • Date
    • Thread