More NetSocket problems...
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