tags:

views:

98

answers:

1

I am using CFFTPStream to send files to a server. I have found that when I do not use persistent sockets not all the data is being sent. I am using similar code to the SimpleFTPSample. In the code that closes the socket I have put a sleep in and this has stopped the bad behavior. To me this indicates that when the stream is closed the data that is still in the CFFTPStreams buffer is not sent. Is there a way to detect that all the data has been sent?

Update: To replicate this problem use the SimpleFTPSample and add the line

CFWriteStreamSetProperty(ftpStream, kCFStreamPropertyFTPAttemptPersistentConnection, kCFBooleanFalse);

to the PutController.m at around line 182 (after the password stuff). Also set the Compress PNG files build variable to false. I am using the MAC built in FTP server. Start putting files and you will see randomly the file is smaller.

A: 

Sorry, could you give me example how to upload multiple files to FTP from iPhone? because SimpleFTPSample is hang up after second file send. Please ))

Artem Svystun