TRCConnectionNSURLSession Class Reference
Inheritance diagram for TRCConnectionNSURLSession:

Properties

NSURLSession * session
 
TRCNetworkReachabilityManagerreachabilityManager
 Current reachabilityManager, it can be used to get current networkReachabilityStatus, isReachable, etc... More...
 
id< TRCConnectionNSURLSessionDelegate > delegate
 
NSURL * baseUrl
 You may change baseUrl in runtime. More...
 

Instance Methods

(instancetype) - init
 init and initWithBaseUrl will use [NSURLSessionConfiguration defaultSessionConfiguration] as configuration. More...
 
(instancetype) - initWithBaseUrl:
 
(instancetype) - initWithConfiguration:
 
(instancetype) - initWithBaseUrl:configuration:
 
(void) - startReachabilityMonitoring
 Invokes startMonitoring on reachabilityManager More...
 
(void) - stopReachabilityMonitoring
 Invokes stopMonitoring on reachabilityManager More...
 
- Instance Methods inherited from <TRCConnection>
(NSMutableURLRequest *) - requestWithOptions:error:
 Creates NSURLRequest using information from TRCRequest. More...
 
(id< TRCProgressHandler >) - sendRequest:withOptions:completion:
 Sends NSURLRequest via network, then handles response using options.responseBodySerialization or writes into options.outputStream. More...
 
(TRCConnectionReachabilityState- reachabilityState
 Returns current reachability state if implemented. More...
 
(void) - setReachabilityDelegate:
 Sets TRCConnectionReachabilityDelegate, which used to get notified about reachabilityState changes. More...
 

Property Documentation

◆ session

- (NSURLSession*) session
readnonatomicstrong

◆ reachabilityManager

- (TRCNetworkReachabilityManager*) reachabilityManager
readnonatomicstrong

Current reachabilityManager, it can be used to get current networkReachabilityStatus, isReachable, etc...

◆ delegate

- (id<TRCConnectionNSURLSessionDelegate>) delegate
readwritenonatomicassign

◆ baseUrl

- (NSURL*) baseUrl
readwritenonatomicassign

You may change baseUrl in runtime.

Method Documentation

◆ init()

- (instancetype) init

init and initWithBaseUrl will use [NSURLSessionConfiguration defaultSessionConfiguration] as configuration.

◆ initWithBaseUrl:()

- (instancetype) initWithBaseUrl: (NSURL *)  baseUrl

◆ initWithConfiguration:()

- (instancetype) initWithConfiguration: (NSURLSessionConfiguration *)  configuration

◆ initWithBaseUrl:configuration:()

- (instancetype) initWithBaseUrl: (NSURL *)  baseUrl
configuration: (NSURLSessionConfiguration *)  configuration 

◆ startReachabilityMonitoring()

- (void) startReachabilityMonitoring

Invokes startMonitoring on reachabilityManager

◆ stopReachabilityMonitoring()

- (void) stopReachabilityMonitoring

Invokes stopMonitoring on reachabilityManager