Note that there are some explanatory texts on larger screens.

plurals
  1. POinitWithDelegate issues - Blackraccoon
    primarykey
    data
    text
    <p>I am using a package called BlackRaccoon to upload files to an FTP server. I'm really struggling with a really basic delegation concept that I just cant figure out.</p> <p>In my uploading class .m file, I have a method which calls the BlackRaccoon uploading request. I use the following code: </p> <pre><code>uploadFile = [BRRequestUpload initWithDelegate: self]; uploadFile.path = @"/filehere.txt"; uploadFile.hostname = @"xxx"; uploadFile.username = @"xxx"; uploadFile.password = @"xxx"; //we start the request [uploadFile start]; </code></pre> <p>And in my .h file i have the following: </p> <pre><code>@interface myClass : NSObject &lt;BRRequestDelegate&gt; { BRRequestCreateDirectory *createDir; BRRequestDelete * deleteDir; BRRequestListDirectory *listDir; BRRequestUpload *uploadFile; NSData *uploadData; } </code></pre> <p>Every time I compile and run, I get an error somewhere in the BlackRaccoon files such as: </p> <blockquote> <p>__25-[BRStreamInfo openRead:]_block_invoke [Line 190] No response from the server. Timeout.</p> </blockquote> <p>On sourcing this error, I find myself in the method creating the read stream, particularly: </p> <pre><code> request.didOpenStream = NO; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, timeout * NSEC_PER_SEC), dispatch_get_local_queue(), ^{ if (!request.didOpenStream &amp;&amp; request.error == nil) { InfoLog(@"No response from the server. Timeout."); request.error = [[BRRequestError alloc] init]; request.error.errorCode = kBRFTPClientStreamTimedOut; [request.delegate requestFailed: request]; [request.streamInfo close: request]; } }); </code></pre> <p>I am totally flunked by this. Our server is up and running and has no timeout issues with our android devices or apps such as 'FTP Sprite'. </p> <p>Im pretty sure the issue lies with the initWithDelegate stuff. I just dont think im delegating correctly, but Im not sure why. Does anybody have any ideas? I know I am in need of (id)init somewhere, but I just dont understand where or how. </p> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload