Inherits from NSObject
Declared in CURLHandle.h

Overview

Wrapper for a CURL easy handle.

Private API used by CURLMulti. Not exported in the framework, and not recommended for general use.

This functionality is only provided for unit tests, and isn’t intended for general use. It is included in the framework, so that frameworks that build on this one (eg ConnectionKit) can use these functions in their unit tests.

Tasks

Other Methods

  • – cancel

    Stops the request — and delivery of delegate messages — as quickly as possible

  • – initialFTPPath

    CURLINFO_FTP_ENTRY_PATH. Only suitable once handle has finished.

Internal Methods from MultiSupport

Testing Methods from TestingSupport

Synchronous Methods from OldAPI

Class Methods

cleanupStandaloneMulti:

Clean up a multi that was created by standaloneMultiForTestPurposes.

+ (void)cleanupStandaloneMulti:(CURLMulti *)multi

Parameters

multi

The multi to clean up.

Discussion

Warning: Not intended for general use.

Declared In

CURLHandle+TestingSupport.h

standaloneMultiForTestPurposes

Returns a new CURLMulti, for use in testing.

+ (CURLMulti *)standaloneMultiForTestPurposes

Return Value

A new CURLMulti object.

Discussion

Generally multi’s are an internal implementation detail, but it’s useful to be able to make new ones for unit tests since sharing multis between tests can create dependencies.

Warning: Not intended for general use.

Declared In

CURLHandle+TestingSupport.h

Instance Methods

cancel

Stops the request — and delivery of delegate messages — as quickly as possible

- (void)cancel

Declared In

CURLHandle.h

completeWithCode:isMulti:

Called by CURLMulti to tell the handle that it has completed.

- (void)completeWithCode:(NSInteger)code isMulti:(BOOL)isMultiCode

Parameters

code

The completion code.

isMultiCode

Is the code a result from the handle itself, or the multi managing it?

Discussion

Warning: Not intended for general use.

Declared In

CURLHandle+MultiSupport.h

curl

The CURL handle managed by this object.

- (CURL *)curl

Return Value

The curl handle.

Discussion

Warning: Not intended for general use.

Declared In

CURLHandle+MultiSupport.h

handledByMulti

Is this handle managed by a multi?

- (BOOL)handledByMulti

Return Value

YES if the handle is managed by a multi.

Discussion

Warning: Not intended for general use.

Declared In

CURLHandle+TestingSupport.h

hasCompleted

Has the handle completed?

- (BOOL)hasCompleted

Return Value

YES if the handle has completed.

Discussion

Warning: Not intended for general use.

Declared In

CURLHandle+MultiSupport.h

initialFTPPath

CURLINFO_FTP_ENTRY_PATH. Only suitable once handle has finished.

- (NSString *)initialFTPPath

Return Value

The value of CURLINFO_FTP_ENTRY_PATH.

Declared In

CURLHandle.h

isCancelled

Has cancel been called on this handle?

- (BOOL)isCancelled

Return Value

YES if the handle has been cancelled.

Discussion

Warning: Not intended for general use.

Declared In

CURLHandle+TestingSupport.h

removedByMulti:

Called by CURLMulti when it stops managing the handle.

- (void)removedByMulti:(CURLMulti *)multi

Parameters

multi

The multi object that was managing this handle.

Discussion

Warning: Not intended for general use.

Declared In

CURLHandle+MultiSupport.h

sendSynchronousRequest:credential:delegate:

Perform a request synchronously.

- (void)sendSynchronousRequest:(NSURLRequest *)request credential:(NSURLCredential *)credential delegate:(id<CURLHandleDelegate>)delegate

Parameters

request

The request to perform.

credential

A credential to use for the request.

delegate

An object to use as the delegate.

Discussion

Please don’t use this unless you have to! To use, -init a handle, and then call this method, as many times as you like. Delegate messages will be delivered fairly normally during the request To cancel a synchronous request, call -cancel on a different thread and this method will return as soon as it can

Declared In

CURLHandle.h