zoukankan      html  css  js  c++  java
  • 我当前能力对AF的理解-AFURLSessionManager.h,写给我自己

    @interface AFURLSessionManager : NSObject <NSURLSessionDelegate, NSURLSessionTaskDelegate, NSURLSessionDataDelegate, NSURLSessionDownloadDelegate, NSSecureCoding, NSCopying>
    

    1.AFURLSessionManager的定义,和实现的协议

      1.1 NSURLSessionDelegate--网络请求的 

      1.2NSURLSessionTaskDelegate -- 请求任务的

      1.3NSURLSessionDataDelegate -- 请求数据的

      1.4NSURLSessionDownloadDelegate -- 下载请求的

      1.5NSSecureCoding -- 请求证书

    @property (readonly, nonatomic, strong) NSURLSession *session;
    

     管理请求用的

    /**
     The operation queue on which delegate callbacks are run.
      代理回调时候,delegate所在的操作队列 */ @property (readonly, nonatomic, strong) NSOperationQueue *operationQueue;

     

    @property (nonatomic, strong) id <AFURLResponseSerialization> responseSerializer;
    

      猜测:对请求回来的数据进行序列化。

    @property (nonatomic, strong) AFSecurityPolicy *securityPolicy;
    

      请求证书配置

    @property (readwrite, nonatomic, strong) AFNetworkReachabilityManager *reachabilityManager;
    

      猜测:判断有网没网

    /**
     The data, upload, and download tasks currently run by the managed session.
     */
    @property (readonly, nonatomic, strong) NSArray <NSURLSessionTask *> *tasks;
    
    /**
     The data tasks currently run by the managed session.
     */
    @property (readonly, nonatomic, strong) NSArray <NSURLSessionDataTask *> *dataTasks;
    
    /**
     The upload tasks currently run by the managed session.
     */
    @property (readonly, nonatomic, strong) NSArray <NSURLSessionUploadTask *> *uploadTasks;
    
    /**
     The download tasks currently run by the managed session.
     */
    @property (readonly, nonatomic, strong) NSArray <NSURLSessionDownloadTask *> *downloadTasks;
    

      猜测:请求任务的数组,数据数组,上传任务,下载任务数组。

    /**
     The dispatch queue for `completionBlock`. If `NULL` (default), the main queue is used.
     */
    @property (nonatomic, strong, nullable) dispatch_queue_t completionQueue;
    
    /**
     The dispatch group for `completionBlock`. If `NULL` (default), a private dispatch group is used.
     */
    @property (nonatomic, strong, nullable) dispatch_group_t completionGroup;
    

      完成时候的队列,队列组

  • 相关阅读:
    【转】禁用chrome firefox 的 WebRTC功能防止真实IP泄漏
    这是我的主场
    【转】反编译获取任何微信小程序源码(完)
    【转】npm 安装express npm ERR! code UNABLE_TO_VERIFY_LEAF_SIGNATURE
    查询最新的邮编地区
    【转】汇编语言入门教程
    Microsoft Windows远程桌面协议中间人攻击漏洞(CVE-2005-1794)漏洞解决方案(Windows server2003)
    IIS隐藏版本号教程(Windows Server 2003)
    Windows Server 2003添加防火墙策略教程
    Tomcat禁用SSLv3和RC4算法
  • 原文地址:https://www.cnblogs.com/tom2015010203/p/12938011.html
Copyright © 2011-2022 走看看